diff options
author | David Robillard <d@drobilla.net> | 2007-01-12 18:12:06 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-01-12 18:12:06 +0000 |
commit | 09a4ea31dc9ce8ef4cd399a6c68054aafe31c325 (patch) | |
tree | c41cd0b337b951ce02890635d19c9c6a5ec6bafc /src/progs/ingenuity/ControlPanel.cpp | |
parent | b162a604d0452752c679e31fd6b3f3de0687151c (diff) | |
download | ingen-09a4ea31dc9ce8ef4cd399a6c68054aafe31c325.tar.gz ingen-09a4ea31dc9ce8ef4cd399a6c68054aafe31c325.tar.bz2 ingen-09a4ea31dc9ce8ef4cd399a6c68054aafe31c325.zip |
Control value persistence/serialization.
git-svn-id: http://svn.drobilla.net/lad/ingen@252 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/ControlPanel.cpp')
-rw-r--r-- | src/progs/ingenuity/ControlPanel.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/progs/ingenuity/ControlPanel.cpp b/src/progs/ingenuity/ControlPanel.cpp index faffae7a..4a96b480 100644 --- a/src/progs/ingenuity/ControlPanel.cpp +++ b/src/progs/ingenuity/ControlPanel.cpp @@ -211,16 +211,21 @@ ControlPanel::disable_port(const Path& path) /** Callback for ControlGroups to notify this of a change. */ void -ControlPanel::value_changed(const Path& port_path, float val) +ControlPanel::value_changed(SharedPtr<PortModel> port, float val) { if (m_callback_enabled) { App::instance().engine()->disable_responses(); + /* Send the message, but set the client-side model's value to the new + * setting right away (so the value doesn't need to be echoed back) */ + if (m_all_voices_radio->get_active()) { - App::instance().engine()->set_port_value(port_path, val); + App::instance().engine()->set_port_value(port->path(), val); + port->value(val); } else { int voice = m_voice_spinbutton->get_value_as_int(); - App::instance().engine()->set_port_value(port_path, voice, val); + App::instance().engine()->set_port_value(port->path(), voice, val); + port->value(val); } App::instance().engine()->set_next_response_id(rand()); // FIXME: inefficient, probably not good |