13
0

Fix missing selection undo for track header click and route list select.

This commit is contained in:
nick_m 2015-01-13 21:41:30 +11:00
parent 877492ef8a
commit 7a3662bc14
2 changed files with 13 additions and 0 deletions

View File

@ -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

View File

@ -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