diff --git a/gtk2_ardour/ardour.bindings b/gtk2_ardour/ardour.bindings index edac5ec4d0..bbb665b5d4 100644 --- a/gtk2_ardour/ardour.bindings +++ b/gtk2_ardour/ardour.bindings @@ -62,7 +62,7 @@ ; (gtk_accel_path "/Main/AudioFileFormatData" "") ; (gtk_accel_path "/options/MeterFalloffFastest" "") (gtk_accel_path "/Editor/audition-at-mouse" "period") -(gtk_accel_path "/Transport/Forward" "Right") +(gtk_accel_path "/Transport/Forward" "rightarrow") ; (gtk_accel_path "/Snap/snap-to-smpte-seconds" "") ; (gtk_accel_path "/Snap/snap-to-smpte-frame" "") ; (gtk_accel_path "/Main/ExportSelection" "") @@ -110,8 +110,6 @@ ; (gtk_accel_path "/Editor/toggle-xfades-visible" "") (gtk_accel_path "/Editor/extend-range-to-end-of-region" "rightanglebracket") (gtk_accel_path "/Editor/scroll-backward" "leftarrow") -(gtk_accel_path "/Editor/scroll-playhead-backward" "leftarrow") -(gtk_accel_path "/Editor/scroll-playhead-forward" "rightarrow") (gtk_accel_path "/Editor/start-range" "KP_Down") ; (gtk_accel_path "/ShuttleActions/SetShuttleUnitsSemitones" "") ; (gtk_accel_path "/JACK/JACKLatency128" "") @@ -119,6 +117,7 @@ ; (gtk_accel_path "/Editor/RegionEditOps" "") ; (gtk_accel_path "/Editor/snap-magnetic" "") ; (gtk_accel_path "/Editor/playhead-to-range-end" "") +(gtk_accel_path "/Editor/scroll-playhead-forward" "rightarrow") (gtk_accel_path "/Editor/align-regions-sync-relative" "a") ; (gtk_accel_path "/Editor/EditSelectRegionOptions" "") (gtk_accel_path "/Editor/crop" "c") @@ -127,6 +126,7 @@ ; (gtk_accel_path "/Editor/MeterFalloff" "") ; (gtk_accel_path "/RegionList/rlRemove" "") (gtk_accel_path "/Transport/GotoStart" "Home") +(gtk_accel_path "/Editor/scroll-playhead-backward" "leftarrow") (gtk_accel_path "/Editor/split-region" "s") ; (gtk_accel_path "/Transport/ToggleAutoInput" "") ; (gtk_accel_path "/Snap/snap-to-thirtyseconds" "") @@ -205,8 +205,8 @@ ; (gtk_accel_path "/Main/Session" "") (gtk_accel_path "/Editor/edit-cursor-to-range-start" "F1") ; (gtk_accel_path "/Main/AudioFileFormat" "") -(gtk_accel_path "/MouseMode/set-mouse-mode-timefx" "t") ; (gtk_accel_path "/Transport/Transport" "") +(gtk_accel_path "/MouseMode/set-mouse-mode-timefx" "t") ; (gtk_accel_path "/RegionList/SortByRegionName" "") ; (gtk_accel_path "/Main/KeyMouse Actions" "") (gtk_accel_path "/MouseMode/set-mouse-mode-gain" "g") @@ -264,7 +264,7 @@ ; (gtk_accel_path "/options/FileHeaderFormatWAVE64" "") (gtk_accel_path "/Editor/brush-at-mouse" "b") ; (gtk_accel_path "/RegionList/rlShowAll" "") -(gtk_accel_path "/Transport/Rewind" "Left") +(gtk_accel_path "/Transport/Rewind" "leftarrow") ; (gtk_accel_path "/RegionList/SortByRegionTimestamp" "") ; (gtk_accel_path "/options/VerifyRemoveLastCapture" "") ; (gtk_accel_path "/options/OutputAutoConnectPhysical" "") diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index d8c6d511b1..4efab64760 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -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; diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 04ef0e6d39..79581381e4 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -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(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();