From 7a3662bc14e1fc6cacd6482f46e51b7ed54a6f52 Mon Sep 17 00:00:00 2001 From: nick_m Date: Tue, 13 Jan 2015 21:41:30 +1100 Subject: [PATCH] Fix missing selection undo for track header click and route list select. --- gtk2_ardour/editor_routes.cc | 4 ++++ gtk2_ardour/route_time_axis.cc | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc index 26b6c11b12..c7ad7c54ff 100644 --- a/gtk2_ardour/editor_routes.cc +++ b/gtk2_ardour/editor_routes.cc @@ -1325,6 +1325,8 @@ EditorRoutes::button_press (GdkEventButton* ev) void EditorRoutes::selection_changed () { + _editor->begin_reversible_selection_op (X_("Select Track from Route List")); + if (_display.get_selection()->count_selected_rows() > 0) { TreeIter iter; @@ -1349,6 +1351,8 @@ EditorRoutes::selection_changed () } else { _editor->get_selection().clear_tracks (); } + + _editor->commit_reversible_selection_op (); } bool diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index d2d4820308..92bee3a4fe 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -1294,15 +1294,22 @@ RouteTimeAxisView::selection_click (GdkEventButton* ev) if (Keyboard::modifier_state_equals (ev->state, (Keyboard::TertiaryModifier|Keyboard::PrimaryModifier))) { /* special case: select/deselect all tracks */ + + _editor.begin_reversible_selection_op (X_("Selection Click")); + if (_editor.get_selection().selected (this)) { _editor.get_selection().clear_tracks (); } else { _editor.select_all_tracks (); } + _editor.commit_reversible_selection_op (); + return; } + _editor.begin_reversible_selection_op (X_("Selection Click")); + switch (ArdourKeyboard::selection_type (ev->state)) { case Selection::Toggle: _editor.get_selection().toggle (this); @@ -1320,6 +1327,8 @@ RouteTimeAxisView::selection_click (GdkEventButton* ev) _editor.get_selection().add (this); break; } + + _editor.commit_reversible_selection_op (); } void -- 2.30.2