diff options
author | David Robillard <d@drobilla.net> | 2012-11-18 18:46:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-11-18 18:46:53 +0000 |
commit | d358cae57b7233bf6b781686979fc4dea4d090b3 (patch) | |
tree | e60f45f73892fd62fea6caef507567c57722b5b9 /ingen/client | |
parent | c8745c6975c6173d08957c4a16bf8b95831ec05a (diff) | |
download | ingen-d358cae57b7233bf6b781686979fc4dea4d090b3.tar.gz ingen-d358cae57b7233bf6b781686979fc4dea4d090b3.tar.bz2 ingen-d358cae57b7233bf6b781686979fc4dea4d090b3.zip |
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
Diffstat (limited to 'ingen/client')
-rw-r--r-- | ingen/client/PortModel.hpp | 21 |
1 files changed, 4 insertions, 17 deletions
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<ObjectModel> model); - uint32_t _index; - Direction _direction; - Raul::Atom _current_val; - size_t _connections; + uint32_t _index; + Direction _direction; + size_t _connections; }; } // namespace Client |