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 --- src/client/PortModel.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/client') diff --git a/src/client/PortModel.cpp b/src/client/PortModel.cpp index 54db0ca1..fdef852d 100644 --- a/src/client/PortModel.cpp +++ b/src/client/PortModel.cpp @@ -24,14 +24,16 @@ void PortModel::on_property(const Raul::URI& uri, const Raul::Atom& value) { if (uri == _uris.ingen_activity) { + // Don't store activity, it is transient signal_activity().emit(value); return; - } else { - if (uri == _uris.ingen_value) { - this->value(value); - } } + ObjectModel::on_property(uri, value); + + if (uri == _uris.ingen_value) { + signal_value_changed().emit(value); + } } bool @@ -51,16 +53,15 @@ PortModel::port_property(const Raul::URI& uri) const void PortModel::set(SharedPtr model) { + ObjectModel::set(model); + SharedPtr port = PtrCast(model); if (port) { _index = port->_index; _direction = port->_direction; - _current_val = port->_current_val; _connections = port->_connections; - _signal_value_changed.emit(_current_val); + _signal_value_changed.emit(get_property(_uris.ingen_value)); } - - ObjectModel::set(model); } } // namespace Client -- cgit v1.2.1