summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_time_axis.cc
diff options
context:
space:
mode:
authorHans Fugal <hans@fugal.net>2006-08-04 03:42:34 +0000
committerHans Fugal <hans@fugal.net>2006-08-04 03:42:34 +0000
commit5756373841675a879833f98bb4008dd0c40714d3 (patch)
tree5ab9e96d4e4314554a818b541bbc8e0e5f0c3e70 /gtk2_ardour/route_time_axis.cc
parent79986643c0c904f6574bb5323e2233a43a9e622e (diff)
Really fixed conflicts. Ready to merge into trunk.
git-svn-id: svn://localhost/ardour2/branches/undo@757 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_time_axis.cc')
-rw-r--r--gtk2_ardour/route_time_axis.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 8dca7be480..82d5b53cba 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -29,6 +29,7 @@
#include <pbd/error.h>
#include <pbd/stl_delete.h>
#include <pbd/whitespace.h>
+#include <pbd/memento_command.h>
#include <gtkmm/menu.h>
#include <gtkmm/menuitem.h>
@@ -1050,12 +1051,12 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
}
}
+ XMLNode &before = playlist->get_state();
switch (op) {
case Cut:
- _session.add_undo (playlist->get_memento());
if ((what_we_got = playlist->cut (time)) != 0) {
editor.get_cut_buffer().add (what_we_got);
- _session.add_redo_no_execute (playlist->get_memento());
+ _session.add_command( new MementoCommand<Playlist>(*playlist, before, playlist->get_state()));
ret = true;
}
break;
@@ -1066,9 +1067,8 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
break;
case Clear:
- _session.add_undo (playlist->get_memento());
if ((what_we_got = playlist->cut (time)) != 0) {
- _session.add_redo_no_execute (playlist->get_memento());
+ _session.add_command( new MementoCommand<Playlist>(*playlist, before, playlist->get_state()));
what_we_got->unref ();
ret = true;
}
@@ -1097,9 +1097,9 @@ RouteTimeAxisView::paste (jack_nframes_t pos, float times, Selection& selection,
if (get_diskstream()->speed() != 1.0f)
pos = session_frame_to_track_frame(pos, get_diskstream()->speed() );
- _session.add_undo (playlist->get_memento());
+ XMLNode &before = playlist->get_state();
playlist->paste (**p, pos, times);
- _session.add_redo_no_execute (playlist->get_memento());
+ _session.add_command( new MementoCommand<Playlist>(*playlist, before, playlist->get_state()));
return true;
}