summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2014-12-23 00:30:23 +1100
committerPaul Davis <paul@linuxaudiosystems.com>2015-01-02 08:01:12 -0500
commita79589249259c8cbef7f1b30fe167d80c9a67412 (patch)
tree87db8957db0e04998f6b343effe3010ea6a2f3e2 /gtk2_ardour/editor_drag.cc
parentb5c9a92a584b70b2af172e7240d4a58b007e0608 (diff)
Separate selection operations into their own temporary history mechanism.
The user can now replay *all* earlier selection operations until the next session undo/redo command, or the completion of a new operation. Nothing relating to selection ops is stored, and selection operation history is begun on first idle. Selection operation history is fundamentally different from the history of operations which act on a selection in terms of both their viewport and the amount of information required to replay them. WRT undo, the user of a selection op doesn't care about the viewport state at the beginning of an op, but rather that at the end of the previous one.
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r--gtk2_ardour/editor_drag.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index b86c265610..965092e65f 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -4379,6 +4379,7 @@ SelectionDrag::finished (GdkEvent* event, bool movement_occurred)
{
Session* s = _editor->session();
+ _editor->begin_reversible_selection_op (_("Change Time Selection"));
if (movement_occurred) {
motion (event, false);
/* XXX this is not object-oriented programming at all. ick */
@@ -4435,6 +4436,7 @@ SelectionDrag::finished (GdkEvent* event, bool movement_occurred)
_editor->stop_canvas_autoscroll ();
_editor->clicked_selection = 0;
+ _editor->commit_reversible_selection_op ();
}
void
@@ -5192,11 +5194,11 @@ EditorRubberbandSelectDrag::select_things (int button_state, framepos_t x1, fram
Selection::Operation op = ArdourKeyboard::selection_type (button_state);
- _editor->begin_reversible_command (_("rubberband selection"));
+ _editor->begin_reversible_selection_op (_("rubberband selection"));
_editor->select_all_within (x1, x2 - 1, y1, y2, _editor->track_views, op, false);
- _editor->commit_reversible_command ();
+ _editor->commit_reversible_selection_op ();
}
void