summaryrefslogtreecommitdiff
path: root/libs/ardour/automation_list.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-06-16 17:20:10 +0000
committerCarl Hetherington <carl@carlh.net>2012-06-16 17:20:10 +0000
commit5ac22e9095d5f851b5238029e3f813bc86fe2280 (patch)
tree51460c63aa9ace692dedceb01494f2a92d4bc364 /libs/ardour/automation_list.cc
parent9429401f11ffa0ee1729dbdc5e14e87cf06e2dc1 (diff)
Add new SharedStatefulProperty which manages a shared_ptr to
some Stateful object, and a subclass to use this for AutomationList. SharedStatefulProperty will manage undo / redo using full copies of the XML state, like MementoCommand, but does it within the Property undo system. git-svn-id: svn://localhost/ardour2/branches/3.0@12740 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/automation_list.cc')
-rw-r--r--libs/ardour/automation_list.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/libs/ardour/automation_list.cc b/libs/ardour/automation_list.cc
index 54d838f6e2..26ca7b097a 100644
--- a/libs/ardour/automation_list.cc
+++ b/libs/ardour/automation_list.cc
@@ -510,3 +510,24 @@ AutomationList::set_state (const XMLNode& node, int version)
return 0;
}
+bool
+AutomationList::operator!= (AutomationList const & other) const
+{
+ return (
+ static_cast<ControlList const &> (*this) != static_cast<ControlList const &> (other) ||
+ _state != other._state ||
+ _style != other._style ||
+ _touching != other._touching
+ );
+}
+
+PBD::PropertyBase *
+AutomationListProperty::clone () const
+{
+ return new AutomationListProperty (
+ this->property_id(),
+ boost::shared_ptr<AutomationList> (new AutomationList (*this->_old.get())),
+ boost::shared_ptr<AutomationList> (new AutomationList (*this->_current.get()))
+ );
+}
+