diff options
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r-- | libs/ardour/playlist.cc | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 8ea84b96bf..851cf8596e 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -124,41 +124,9 @@ RegionListProperty::lookup_id (const ID& id) return ret; } -RegionListProperty* -RegionListProperty::copy_for_history () const +SequenceProperty<std::list<boost::shared_ptr<Region> > >* RegionListProperty::create () const { - RegionListProperty* copy = new RegionListProperty (_playlist); - /* this is all we need */ - copy->_change = _change; - return copy; -} - -void -RegionListProperty::diff (PropertyList& undo, PropertyList& redo, Command* cmd) const -{ - if (changed()) { - /* list of the removed/added regions since clear_history() was last called */ - RegionListProperty* a = copy_for_history (); - - /* the same list, but with removed/added lists swapped (for undo purposes) */ - RegionListProperty* b = copy_for_history (); - b->invert_changes (); - - if (cmd) { - /* whenever one of the regions emits DropReferences, make sure - that the Destructible we've been told to notify hears about - it. the Destructible is likely to be the Command being built - with this diff(). - */ - - for (set<boost::shared_ptr<Region> >::iterator i = a->change().added.begin(); i != a->change().added.end(); ++i) { - (*i)->DropReferences.connect_same_thread (*cmd, boost::bind (&Destructible::drop_references, cmd)); - } - } - - undo.add (b); - redo.add (a); - } + return new RegionListProperty (_playlist); } Playlist::Playlist (Session& sess, string nom, DataType type, bool hide) |