diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-04 13:15:04 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-04 13:15:04 +0000 |
commit | 6dde6c5a8fc0630d625f4b73e253ed7e7a48c03a (patch) | |
tree | 17160bb08ad26459194490e420e2a15f94e6d4c8 /libs/ardour/playlist.cc | |
parent | c2c224727eee4c16bd64ca4a5b5bb2d276f5afe3 (diff) |
goodbye to MementoCommand for playlists
git-svn-id: svn://localhost/ardour2/branches/3.0@6726 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r-- | libs/ardour/playlist.cc | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 8d3b59427d..2b9ce7824f 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -26,9 +26,9 @@ #include <climits> #include "pbd/failed_constructor.h" +#include "pbd/stateful_diff_command.h" #include "pbd/stl_delete.h" #include "pbd/xml++.h" -#include "pbd/stacktrace.h" #include "ardour/debug.h" #include "ardour/playlist.h" @@ -2026,6 +2026,29 @@ Playlist::set_property (const PropertyBase& prop) } void +Playlist::rdiff (vector<StatefulDiffCommand*>& cmds) const +{ + RegionLock rlock (const_cast<Playlist *> (this)); + + for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) { + if ((*i)->changed ()) { + StatefulDiffCommand* sdc = new StatefulDiffCommand (*i); + cmds.push_back (sdc); + } + } +} + +void +Playlist::clear_owned_history () +{ + RegionLock rlock (this); + + for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { + (*i)->clear_history (); + } +} + +void Playlist::update (const RegionListProperty::ChangeRecord& change) { DEBUG_TRACE (DEBUG::Properties, string_compose ("Playlist %1 updates from a change record with %2 adds %3 removes\n", |