fix absolute fade in/out length during drag and odd select/deselect behaviour
git-svn-id: svn://localhost/ardour2/trunk@1340 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
729e6cc980
commit
c46b9078e3
@ -62,7 +62,7 @@
|
||||
; (gtk_accel_path "<Actions>/Main/AudioFileFormatData" "")
|
||||
; (gtk_accel_path "<Actions>/options/MeterFalloffFastest" "")
|
||||
(gtk_accel_path "<Actions>/Editor/audition-at-mouse" "period")
|
||||
(gtk_accel_path "<Actions>/Transport/Forward" "<Control>Right")
|
||||
(gtk_accel_path "<Actions>/Transport/Forward" "<Control>rightarrow")
|
||||
; (gtk_accel_path "<Actions>/Snap/snap-to-smpte-seconds" "")
|
||||
; (gtk_accel_path "<Actions>/Snap/snap-to-smpte-frame" "")
|
||||
; (gtk_accel_path "<Actions>/Main/ExportSelection" "")
|
||||
@ -110,8 +110,6 @@
|
||||
; (gtk_accel_path "<Actions>/Editor/toggle-xfades-visible" "")
|
||||
(gtk_accel_path "<Actions>/Editor/extend-range-to-end-of-region" "rightanglebracket")
|
||||
(gtk_accel_path "<Actions>/Editor/scroll-backward" "leftarrow")
|
||||
(gtk_accel_path "<Actions>/Editor/scroll-playhead-backward" "<Control>leftarrow")
|
||||
(gtk_accel_path "<Actions>/Editor/scroll-playhead-forward" "<Control>rightarrow")
|
||||
(gtk_accel_path "<Actions>/Editor/start-range" "<Control>KP_Down")
|
||||
; (gtk_accel_path "<Actions>/ShuttleActions/SetShuttleUnitsSemitones" "")
|
||||
; (gtk_accel_path "<Actions>/JACK/JACKLatency128" "")
|
||||
@ -119,6 +117,7 @@
|
||||
; (gtk_accel_path "<Actions>/Editor/RegionEditOps" "")
|
||||
; (gtk_accel_path "<Actions>/Editor/snap-magnetic" "")
|
||||
; (gtk_accel_path "<Actions>/Editor/playhead-to-range-end" "")
|
||||
(gtk_accel_path "<Actions>/Editor/scroll-playhead-forward" "<Shift>rightarrow")
|
||||
(gtk_accel_path "<Actions>/Editor/align-regions-sync-relative" "a")
|
||||
; (gtk_accel_path "<Actions>/Editor/EditSelectRegionOptions" "")
|
||||
(gtk_accel_path "<Actions>/Editor/crop" "c")
|
||||
@ -127,6 +126,7 @@
|
||||
; (gtk_accel_path "<Actions>/Editor/MeterFalloff" "")
|
||||
; (gtk_accel_path "<Actions>/RegionList/rlRemove" "")
|
||||
(gtk_accel_path "<Actions>/Transport/GotoStart" "Home")
|
||||
(gtk_accel_path "<Actions>/Editor/scroll-playhead-backward" "<Shift>leftarrow")
|
||||
(gtk_accel_path "<Actions>/Editor/split-region" "s")
|
||||
; (gtk_accel_path "<Actions>/Transport/ToggleAutoInput" "")
|
||||
; (gtk_accel_path "<Actions>/Snap/snap-to-thirtyseconds" "")
|
||||
@ -205,8 +205,8 @@
|
||||
; (gtk_accel_path "<Actions>/Main/Session" "")
|
||||
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-range-start" "F1")
|
||||
; (gtk_accel_path "<Actions>/Main/AudioFileFormat" "")
|
||||
(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-timefx" "t")
|
||||
; (gtk_accel_path "<Actions>/Transport/Transport" "")
|
||||
(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-timefx" "t")
|
||||
; (gtk_accel_path "<Actions>/RegionList/SortByRegionName" "")
|
||||
; (gtk_accel_path "<Actions>/Main/KeyMouse Actions" "")
|
||||
(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-gain" "g")
|
||||
@ -264,7 +264,7 @@
|
||||
; (gtk_accel_path "<Actions>/options/FileHeaderFormatWAVE64" "")
|
||||
(gtk_accel_path "<Actions>/Editor/brush-at-mouse" "<Control>b")
|
||||
; (gtk_accel_path "<Actions>/RegionList/rlShowAll" "")
|
||||
(gtk_accel_path "<Actions>/Transport/Rewind" "<Control>Left")
|
||||
(gtk_accel_path "<Actions>/Transport/Rewind" "<Control>leftarrow")
|
||||
; (gtk_accel_path "<Actions>/RegionList/SortByRegionTimestamp" "")
|
||||
; (gtk_accel_path "<Actions>/options/VerifyRemoveLastCapture" "")
|
||||
; (gtk_accel_path "<Actions>/options/OutputAutoConnectPhysical" "")
|
||||
|
@ -2921,7 +2921,17 @@ Editor::set_selected_track (TimeAxisView& view, Selection::Operation op, bool no
|
||||
if (selection->selected (&view) && selection->tracks.size() == 1) {
|
||||
/* no commit necessary */
|
||||
} else {
|
||||
selection->set (&view);
|
||||
|
||||
/* reset track selection if there is only 1 other track
|
||||
selected OR if no_remove is not set (its there to
|
||||
prevent deselecting a multi-track selection
|
||||
when clicking on an already selected track
|
||||
for some reason.
|
||||
*/
|
||||
|
||||
if (selection->tracks.size() <= 1 || !no_remove) {
|
||||
selection->set (&view);
|
||||
}
|
||||
commit = true;
|
||||
}
|
||||
break;
|
||||
|
@ -1784,6 +1784,13 @@ Editor::fade_in_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
snap_to (pos);
|
||||
}
|
||||
|
||||
if (pos < (arv->region()->position() + 64)) {
|
||||
fade_length = 64; // this should be a minimum defined somewhere
|
||||
} else if (pos > arv->region()->last_frame()) {
|
||||
fade_length = arv->region()->length();
|
||||
} else {
|
||||
fade_length = pos - arv->region()->position();
|
||||
}
|
||||
/* mapover the region selection */
|
||||
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||
@ -1794,14 +1801,6 @@ Editor::fade_in_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pos < (tmp->region()->position() + 64)) {
|
||||
fade_length = 64; // this should be a minimum defined somewhere
|
||||
} else if (pos > tmp->region()->last_frame()) {
|
||||
fade_length = tmp->region()->length();
|
||||
} else {
|
||||
fade_length = pos - tmp->region()->position();
|
||||
}
|
||||
|
||||
tmp->reset_fade_in_shape_width (fade_length);
|
||||
}
|
||||
|
||||
@ -1813,6 +1812,7 @@ Editor::fade_in_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
void
|
||||
Editor::fade_in_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
|
||||
nframes_t pos;
|
||||
nframes_t fade_length;
|
||||
|
||||
@ -1824,6 +1824,14 @@ Editor::fade_in_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* even
|
||||
pos = 0;
|
||||
}
|
||||
|
||||
if (pos < (arv->region()->position() + 64)) {
|
||||
fade_length = 64; // this should be a minimum defined somewhere
|
||||
} else if (pos > arv->region()->last_frame()) {
|
||||
fade_length = arv->region()->length();
|
||||
} else {
|
||||
fade_length = pos - arv->region()->position();
|
||||
}
|
||||
|
||||
begin_reversible_command (_("change fade in length"));
|
||||
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||
@ -1837,14 +1845,6 @@ Editor::fade_in_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* even
|
||||
AutomationList& alist = tmp->audio_region()->fade_in();
|
||||
XMLNode &before = alist.get_state();
|
||||
|
||||
if (pos < (tmp->region()->position() + 64)) {
|
||||
fade_length = 64; // this should be a minimum defined somewhere
|
||||
} else if (pos > tmp->region()->last_frame()) {
|
||||
fade_length = tmp->region()->length();
|
||||
} else {
|
||||
fade_length = pos - tmp->region()->position();
|
||||
}
|
||||
|
||||
tmp->audio_region()->set_fade_in_length (fade_length);
|
||||
|
||||
XMLNode &after = alist.get_state();
|
||||
@ -1890,7 +1890,17 @@ Editor::fade_out_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
snap_to (pos);
|
||||
}
|
||||
|
||||
|
||||
if (pos > (arv->region()->last_frame() - 64)) {
|
||||
fade_length = 64; // this should really be a minimum fade defined somewhere
|
||||
}
|
||||
else if (pos < arv->region()->position()) {
|
||||
fade_length = arv->region()->length();
|
||||
}
|
||||
else {
|
||||
fade_length = arv->region()->last_frame() - pos;
|
||||
}
|
||||
|
||||
/* mapover the region selection */
|
||||
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||
@ -1901,16 +1911,6 @@ Editor::fade_out_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pos > (tmp->region()->last_frame() - 64)) {
|
||||
fade_length = 64; // this should really be a minimum fade defined somewhere
|
||||
}
|
||||
else if (pos < arv->region()->position()) {
|
||||
fade_length = tmp->region()->length();
|
||||
}
|
||||
else {
|
||||
fade_length = tmp->region()->last_frame() - pos;
|
||||
}
|
||||
|
||||
tmp->reset_fade_out_shape_width (fade_length);
|
||||
}
|
||||
|
||||
@ -1939,6 +1939,16 @@ Editor::fade_out_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* eve
|
||||
snap_to (pos);
|
||||
}
|
||||
|
||||
if (pos > (arv->region()->last_frame() - 64)) {
|
||||
fade_length = 64; // this should really be a minimum fade defined somewhere
|
||||
}
|
||||
else if (pos < arv->region()->position()) {
|
||||
fade_length = arv->region()->length();
|
||||
}
|
||||
else {
|
||||
fade_length = arv->region()->last_frame() - pos;
|
||||
}
|
||||
|
||||
begin_reversible_command (_("change fade out length"));
|
||||
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||
@ -1952,16 +1962,6 @@ Editor::fade_out_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* eve
|
||||
AutomationList& alist = tmp->audio_region()->fade_out();
|
||||
XMLNode &before = alist.get_state();
|
||||
|
||||
if (pos > (tmp->region()->last_frame() - 64)) {
|
||||
fade_length = 64; // this should really be a minimum fade defined somewhere
|
||||
}
|
||||
else if (pos < tmp->region()->position()) {
|
||||
fade_length = tmp->region()->length();
|
||||
}
|
||||
else {
|
||||
fade_length = tmp->region()->last_frame() - pos;
|
||||
}
|
||||
|
||||
tmp->audio_region()->set_fade_out_length (fade_length);
|
||||
|
||||
XMLNode &after = alist.get_state();
|
||||
|
Loading…
Reference in New Issue
Block a user