diff options
author | Carl Hetherington <carl@carlh.net> | 2010-03-31 22:45:27 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-03-31 22:45:27 +0000 |
commit | afc5e3bd0251dbcdbde27036569eb1acab026991 (patch) | |
tree | e8b85a38bb9707b15f1a4d721c5b8b8901245109 /libs/pbd/stateful.cc | |
parent | 7f8b337d309fe62a442ef8c3086b7eb97c7e57e9 (diff) |
Rework to set Stateful properties automagically in the Stateful class rather than delegating to subclasses.
git-svn-id: svn://localhost/ardour2/branches/3.0@6817 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/stateful.cc')
-rw-r--r-- | libs/pbd/stateful.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/pbd/stateful.cc b/libs/pbd/stateful.cc index 89b22edd24..36a0d74778 100644 --- a/libs/pbd/stateful.cc +++ b/libs/pbd/stateful.cc @@ -299,4 +299,16 @@ Stateful::changed() const return false; } +bool +Stateful::set_property (const PropertyBase& prop) +{ + OwnedPropertyList::iterator i = _properties->find (prop.property_id()); + if (i == _properties->end()) { + return false; + } + + i->second->set_state_from_property (&prop); + return true; +} + } // namespace PBD |