diff options
author | David Robillard <d@drobilla.net> | 2009-10-31 23:33:42 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-31 23:33:42 +0000 |
commit | 860e0f7cc7dbba7b644bb6d056873fd70e8052d2 (patch) | |
tree | 54da2fa8b9867f69366839a704a6fb50474b9a1a | |
parent | 2ba6b399610313d4ad09ada73e271f743763bea3 (diff) | |
download | ingen-860e0f7cc7dbba7b644bb6d056873fd70e8052d2.tar.gz ingen-860e0f7cc7dbba7b644bb6d056873fd70e8052d2.tar.bz2 ingen-860e0f7cc7dbba7b644bb6d056873fd70e8052d2.zip |
Fire signals on add_property as well as set_property (fix ticket #389).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2206 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/client/ObjectModel.cpp | 8 | ||||
-rw-r--r-- | src/client/ObjectModel.hpp | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp index bdf0be4f..3ffd96bd 100644 --- a/src/client/ObjectModel.cpp +++ b/src/client/ObjectModel.cpp @@ -56,6 +56,14 @@ ObjectModel::set_meta_property(const Raul::URI& key, const Raul::Atom& value) } +void +ObjectModel::add_property(const Raul::URI& key, const Raul::Atom& value) +{ + ResourceImpl::add_property(key, value); + signal_property.emit(key, value); +} + + const Atom& ObjectModel::get_property(const Raul::URI& key) const { diff --git a/src/client/ObjectModel.hpp b/src/client/ObjectModel.hpp index 25657ed5..72692d65 100644 --- a/src/client/ObjectModel.hpp +++ b/src/client/ObjectModel.hpp @@ -54,10 +54,11 @@ class ObjectModel : virtual public Ingen::Shared::GraphObject public: virtual ~ObjectModel(); - virtual const Raul::Atom& get_property(const Raul::URI& key) const; + const Raul::Atom& get_property(const Raul::URI& key) const; - virtual Raul::Atom& set_property(const Raul::URI& key, const Raul::Atom& value); - virtual Raul::Atom& set_meta_property(const Raul::URI& key, const Raul::Atom& value); + Raul::Atom& set_property(const Raul::URI& key, const Raul::Atom& value); + void add_property(const Raul::URI& key, const Raul::Atom& value); + Raul::Atom& set_meta_property(const Raul::URI& key, const Raul::Atom& value); Resource& meta() { return _meta; } const Resource& meta() const { return _meta; } |