From 860e0f7cc7dbba7b644bb6d056873fd70e8052d2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 31 Oct 2009 23:33:42 +0000 Subject: 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 --- src/client/ObjectModel.cpp | 8 ++++++++ src/client/ObjectModel.hpp | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src/client') 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; } -- cgit v1.2.1