diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-02 18:05:26 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-02 18:05:26 +0000 |
commit | 17088ee3ea5af1e6174b098bb5bcfdaec6ebf9b0 (patch) | |
tree | cbf9fe8fb94212f9a50c6b760ebaac3b4a1bcec6 /gtk2_ardour/editor_audio_import.cc | |
parent | a5ab2e99e19d5f5d4c1f91f38cd774fefdf257dc (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/editor_audio_import.cc')
-rw-r--r-- | gtk2_ardour/editor_audio_import.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc index 05056f3829..201659d7b4 100644 --- a/gtk2_ardour/editor_audio_import.cc +++ b/gtk2_ardour/editor_audio_import.cc @@ -29,6 +29,7 @@ #include "pbd/pthread_utils.h" #include "pbd/basename.h" #include "pbd/shortpath.h" +#include "pbd/stateful_diff_command.h" #include <gtkmm2ext/choice.h> @@ -840,9 +841,9 @@ Editor::finish_bringing_in_material (boost::shared_ptr<Region> region, uint32_t boost::shared_ptr<Playlist> playlist = existing_track->diskstream()->playlist(); boost::shared_ptr<Region> copy (RegionFactory::create (region, region->properties())); begin_reversible_command (_("insert file")); - XMLNode &before = playlist->get_state(); + playlist->clear_history (); playlist->add_region (copy, pos); - _session->add_command (new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state())); + _session->add_command (new StatefulDiffCommand (playlist)); commit_reversible_command (); break; } |