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/pbd | |
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/pbd')
-rw-r--r-- | libs/pbd/pbd/property_basics.h | 1 | ||||
-rw-r--r-- | libs/pbd/pbd/stateful.h | 2 | ||||
-rw-r--r-- | libs/pbd/stateful.cc | 11 |
3 files changed, 14 insertions, 0 deletions
diff --git a/libs/pbd/pbd/property_basics.h b/libs/pbd/pbd/property_basics.h index c99fee1961..e818e36e90 100644 --- a/libs/pbd/pbd/property_basics.h +++ b/libs/pbd/pbd/property_basics.h @@ -95,6 +95,7 @@ public: const gchar*property_name () const { return g_quark_to_string (_property_id); } PropertyID property_id () const { return _property_id; } + bool changed() const { return _have_old; } bool operator==(PropertyID pid) const { return _property_id == pid; diff --git a/libs/pbd/pbd/stateful.h b/libs/pbd/pbd/stateful.h index 93f353a095..5585b5c13b 100644 --- a/libs/pbd/pbd/stateful.h +++ b/libs/pbd/pbd/stateful.h @@ -71,6 +71,8 @@ class Stateful { void clear_history (); void diff (PropertyList&, PropertyList&) const; + bool changed() const; + /* create a property list from an XMLNode */ virtual PropertyList* property_factory(const XMLNode&) const { return 0; } diff --git a/libs/pbd/stateful.cc b/libs/pbd/stateful.cc index 1bf8c17d83..89b22edd24 100644 --- a/libs/pbd/stateful.cc +++ b/libs/pbd/stateful.cc @@ -287,5 +287,16 @@ Stateful::resume_property_changes () send_change (what_changed); } +bool +Stateful::changed() const +{ + for (OwnedPropertyList::const_iterator i = _properties->begin(); i != _properties->end(); ++i) { + if (i->second->changed()) { + return true; + } + } + + return false; +} } // namespace PBD |