summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_time_axis.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-03-02 18:05:26 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-03-02 18:05:26 +0000
commit17088ee3ea5af1e6174b098bb5bcfdaec6ebf9b0 (patch)
treecbf9fe8fb94212f9a50c6b760ebaac3b4a1bcec6 /gtk2_ardour/midi_time_axis.cc
parenta5ab2e99e19d5f5d4c1f91f38cd774fefdf257dc (diff)
(1) remove most uses of MementoCommand for Playlist and Region (2) move frozen state from Region into Stateful, renamed "suspend property changes" (3) successive changes to a Property (scalar) after clear_history() do not keep resetting the old value (fixes region trim)
git-svn-id: svn://localhost/ardour2/branches/3.0@6720 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r--gtk2_ardour/midi_time_axis.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index b1adb7c67e..5949541e56 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -31,6 +31,7 @@
#include "pbd/basename.h"
#include "pbd/enumwriter.h"
#include "pbd/memento_command.h"
+#include "pbd/stateful_diff_command.h"
#include <gtkmm2ext/gtk_ui.h>
#include <gtkmm2ext/selector.h>
@@ -966,7 +967,7 @@ MidiTimeAxisView::add_region (nframes64_t pos)
Editor* real_editor = dynamic_cast<Editor*> (&_editor);
real_editor->begin_reversible_command (_("create region"));
- XMLNode &before = playlist()->get_state();
+ playlist()->clear_history ();
framepos_t start = pos;
real_editor->snap_to (start, -1);
@@ -988,8 +989,7 @@ MidiTimeAxisView::add_region (nframes64_t pos)
boost::shared_ptr<Region> region = (RegionFactory::create (src, plist));
playlist()->add_region (region, start);
- XMLNode &after = playlist()->get_state();
- _session->add_command (new MementoCommand<Playlist> (*playlist().get(), &before, &after));
+ _session->add_command (new StatefulDiffCommand (playlist()));
real_editor->commit_reversible_command();