summaryrefslogtreecommitdiff
path: root/gtk2_ardour/audio_time_axis.cc
diff options
context:
space:
mode:
authorHans Fugal <hans@fugal.net>2006-07-29 03:17:11 +0000
committerHans Fugal <hans@fugal.net>2006-07-29 03:17:11 +0000
commit1f1c4981de73b13d0b7617d8ebe89d9f22dddec3 (patch)
tree90ab3942960de1af673d8d2b4423f0b09dd839b4 /gtk2_ardour/audio_time_axis.cc
parent277b771a978b10580a46e19f19ae0cf2d8819f46 (diff)
Compiles, but doesn't link. The link errors are mostly expected and are
tomorrow's task. git-svn-id: svn://localhost/ardour2/branches/undo@719 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_time_axis.cc')
-rw-r--r--gtk2_ardour/audio_time_axis.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc
index ebc97be77b..857adff6b9 100644
--- a/gtk2_ardour/audio_time_axis.cc
+++ b/gtk2_ardour/audio_time_axis.cc
@@ -30,6 +30,7 @@
#include <pbd/error.h>
#include <pbd/stl_delete.h>
#include <pbd/whitespace.h>
+#include <pbd/memento_command.h>
#include <gtkmm2ext/bindable_button.h>
#include <gtkmm2ext/gtk_ui.h>
@@ -1739,14 +1740,13 @@ AudioTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
}
}
- XMLNode &before, &after;
+ XMLNode &before = playlist->get_state();
switch (op) {
case Cut:
- before = playlist->get_state();
if ((what_we_got = playlist->cut (time)) != 0) {
editor.get_cut_buffer().add (what_we_got);
- after = playlist->get_state();
- _session.add_command (MementoCommand<Playlist>(*playlist, before, after));
+ XMLNode &after = playlist->get_state();
+ _session.add_command (new MementoCommand<Playlist>(*playlist, before, after));
ret = true;
}
break;
@@ -1757,9 +1757,9 @@ AudioTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
break;
case Clear:
- before = playlist->get_state();
if ((what_we_got = playlist->cut (time)) != 0) {
- _session.add_command(MementoCommand<Playlist>(*playlist, before, after));
+ XMLNode &after = playlist->get_state();
+ _session.add_command(new MementoCommand<Playlist>(*playlist, before, after));
what_we_got->unref ();
ret = true;
}
@@ -1790,7 +1790,7 @@ AudioTimeAxisView::paste (jack_nframes_t pos, float times, Selection& selection,
XMLNode &before = playlist->get_state();
playlist->paste (**p, pos, times);
- _session.add_command(MementoCommand<Playlist>(*playlist, before,
+ _session.add_command(new MementoCommand<Playlist>(*playlist, before,
playlist->get_state()));
return true;