From d358cae57b7233bf6b781686979fc4dea4d090b3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 18 Nov 2012 18:46:53 +0000 Subject: Fix learn for Trigger and Internal nodes. Set value property for inputs when a notification is sent so model is consistent (and learned values are saved correctly). Don't redundantly store value atom in PortModel, just use property directly. Fix incorrect use of lv2:integer as a predicate. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4835 a436a847-0d15-0410-975c-d299462d15a1 --- ingen/client/PortModel.hpp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'ingen') diff --git a/ingen/client/PortModel.hpp b/ingen/client/PortModel.hpp index 675cc827..6a8583de 100644 --- a/ingen/client/PortModel.hpp +++ b/ingen/client/PortModel.hpp @@ -46,7 +46,7 @@ public: bool supports(const Raul::URI& value_type) const; inline uint32_t index() const { return _index; } - inline const Raul::Atom& value() const { return _current_val; } + inline const Raul::Atom& value() const { return get_property(_uris.ingen_value); } inline bool connected() const { return (_connections > 0); } inline bool is_input() const { return (_direction == INPUT); } inline bool is_output() const { return (_direction == OUTPUT); } @@ -66,18 +66,6 @@ public: void on_property(const Raul::URI& uri, const Raul::Atom& value); - inline void value(const Raul::Atom& val) { - if (val != _current_val) { - _current_val = val; - _signal_value_changed.emit(val); - } - } - - inline void value(uint32_t voice, const Raul::Atom& val) { - // FIXME: implement properly - _signal_voice_changed.emit(voice, val); - } - // Signals INGEN_SIGNAL(value_changed, void, const Raul::Atom&); INGEN_SIGNAL(voice_changed, void, uint32_t, const Raul::Atom&); @@ -113,10 +101,9 @@ private: void set(SharedPtr model); - uint32_t _index; - Direction _direction; - Raul::Atom _current_val; - size_t _connections; + uint32_t _index; + Direction _direction; + size_t _connections; }; } // namespace Client -- cgit v1.2.1