diff --git a/libs/pbd/pbd/properties.h b/libs/pbd/pbd/properties.h index 076830da42..0d0f5f72f3 100644 --- a/libs/pbd/pbd/properties.h +++ b/libs/pbd/pbd/properties.h @@ -166,7 +166,7 @@ public: /* VARIOUS */ - void apply_changes (PropertyBase const * p) { + void apply_change (PropertyBase const * p) { T v = dynamic_cast* > (p)->val (); if (v != _current) { set (v); @@ -444,7 +444,7 @@ public: } } - void apply_changes (PropertyBase const * p) { + void apply_change (PropertyBase const * p) { *_current = *(dynamic_cast (p))->val (); } diff --git a/libs/pbd/pbd/property_basics.h b/libs/pbd/pbd/property_basics.h index 89b2efe3b7..da064c90a9 100644 --- a/libs/pbd/pbd/property_basics.h +++ b/libs/pbd/pbd/property_basics.h @@ -150,7 +150,7 @@ public: virtual PropertyBase* clone () const = 0; /** Set this property's current state from another */ - virtual void apply_changes (PropertyBase const *) = 0; + virtual void apply_change (PropertyBase const *) = 0; const gchar* property_name () const { return g_quark_to_string (_property_id); } PropertyID property_id () const { return _property_id; } diff --git a/libs/pbd/pbd/sequence_property.h b/libs/pbd/pbd/sequence_property.h index f9efbf19ce..e1bcccdb5d 100644 --- a/libs/pbd/pbd/sequence_property.h +++ b/libs/pbd/pbd/sequence_property.h @@ -139,7 +139,7 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase _changes.removed.clear (); } - void apply_changes (PropertyBase const * p) { + void apply_change (PropertyBase const * p) { const ChangeRecord& change (dynamic_cast (p)->changes ()); update (change); } diff --git a/libs/pbd/pbd/stateful.h b/libs/pbd/pbd/stateful.h index 4041a06208..e474357c4f 100644 --- a/libs/pbd/pbd/stateful.h +++ b/libs/pbd/pbd/stateful.h @@ -54,7 +54,7 @@ class LIBPBD_API Stateful { virtual XMLNode& get_state (void) = 0; virtual int set_state (const XMLNode&, int version) = 0; - virtual bool apply_changes (PropertyBase const &); + virtual bool apply_change (PropertyBase const &); PropertyChange apply_changes (PropertyList const &); const OwnedPropertyList& properties() const { return *_properties; } diff --git a/libs/pbd/stateful.cc b/libs/pbd/stateful.cc index 5df44693ee..835c977a5e 100644 --- a/libs/pbd/stateful.cc +++ b/libs/pbd/stateful.cc @@ -248,9 +248,13 @@ Stateful::apply_changes (const PropertyList& property_list) string_compose ("actually setting property %1 using %2\n", p->second->property_name(), i->second->property_name()) ); - if (apply_changes (*i->second)) { + if (apply_change (*i->second)) { + DEBUG_TRACE (DEBUG::Stateful, string_compose ("applying change succeeded, add %1 to change list\n", p->second->property_name())); c.add (i->first); + } else { + DEBUG_TRACE (DEBUG::Stateful, string_compose ("applying change failed for %1\n", p->second->property_name())); } + } else { DEBUG_TRACE (DEBUG::Stateful, string_compose ("passed in property %1 not found in own property list\n", i->second->property_name())); @@ -341,14 +345,14 @@ Stateful::changed() const } bool -Stateful::apply_changes (const PropertyBase& prop) +Stateful::apply_change (const PropertyBase& prop) { OwnedPropertyList::iterator i = _properties->find (prop.property_id()); if (i == _properties->end()) { return false; } - i->second->apply_changes (&prop); + i->second->apply_change (&prop); return true; }