Skip to content

Commit

Permalink
Fix missing selection undo for track header click and route list select.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmains committed Jan 13, 2015
1 parent 877492e commit 7a3662b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gtk2_ardour/editor_routes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -1349,6 +1351,8 @@ EditorRoutes::selection_changed ()
} else {
_editor->get_selection().clear_tracks ();
}

_editor->commit_reversible_selection_op ();
}

bool
Expand Down
9 changes: 9 additions & 0 deletions gtk2_ardour/route_time_axis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -1320,6 +1327,8 @@ RouteTimeAxisView::selection_click (GdkEventButton* ev)
_editor.get_selection().add (this);
break;
}

_editor.commit_reversible_selection_op ();
}

void
Expand Down

0 comments on commit 7a3662b

Please sign in to comment.