summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorHans Fugal <hans@fugal.net>2006-07-26 23:28:54 +0000
committerHans Fugal <hans@fugal.net>2006-07-26 23:28:54 +0000
commit8e301e875aacc4b7d37f6ed552e460511dafb7f2 (patch)
tree702f85ec8edf8a97a4509b6351e52650bd803504 /gtk2_ardour/editor_ops.cc
parentb7bffbe7a249356a93d25a41f7c472cc9dd8f27f (diff)
r199@gandalf: fugalh | 2006-07-26 17:22:38 -0600
Memento(Redo|Undo)Command has a noop for the undo or redo respectively, and we don't need both before and after state. This is primarily useful for drag start/finish callbacks, and really only makes sense where wrapped by (begin|commit)_reversible_command (a composite command). Also a few more "normal" MementoCommands. git-svn-id: svn://localhost/ardour2/branches/undo@695 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 579b2403c6..815d50ae3e 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -2997,7 +2997,7 @@ Editor::cut_copy_regions (CutCopyOp op)
insert_result = freezelist.insert (pl);
if (insert_result.second) {
pl->freeze ();
- session->add_undo (pl->get_memento());
+ session->add_command (MementoUndoCommand<Playlist>(*pl, pl->get_state()));
}
}
}
@@ -3055,7 +3055,7 @@ Editor::cut_copy_regions (CutCopyOp op)
for (set<Playlist*>::iterator pl = freezelist.begin(); pl != freezelist.end(); ++pl) {
(*pl)->thaw ();
- session->add_redo_no_execute ((*pl)->get_memento());
+ session->add_command (MementoRedoCommand<Playlist>(*(*pl), *(*pl)->get_state()));
}
}