summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-14 22:36:12 +0000
committerDavid Robillard <d@drobilla.net>2008-08-14 22:36:12 +0000
commitbde12203a31e8db6b04793587bf1864383d07539 (patch)
tree02d0a31d5a263731e743dc696f03763ca37ed3d5 /src
parent45689d6eab8d2a6bcdbe8b45d7de2d4ef806de0c (diff)
downloadingen-bde12203a31e8db6b04793587bf1864383d07539.tar.gz
ingen-bde12203a31e8db6b04793587bf1864383d07539.tar.bz2
ingen-bde12203a31e8db6b04793587bf1864383d07539.zip
Support toggle controls on module ports.
git-svn-id: http://svn.drobilla.net/lad/ingen@1381 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/libs/gui/Port.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/gui/Port.cpp b/src/libs/gui/Port.cpp
index 8d0e230a..71050a3e 100644
--- a/src/libs/gui/Port.cpp
+++ b/src/libs/gui/Port.cpp
@@ -52,6 +52,7 @@ Port::Port(boost::shared_ptr<FlowCanvas::Module> module, SharedPtr<PortModel> pm
_port_model->signal_renamed.connect(sigc::mem_fun(this, &Port::renamed));
if (pm->type().is_control()) {
+ set_toggled(pm->is_toggle());
show_control();
float min = 0.0f, max = 1.0f;
@@ -129,6 +130,8 @@ Port::variable_changed(const string& key, const Atom& value)
set_control_min(value.get_float());
else if ( (key == "ingen:maximum") && value.type() == Atom::FLOAT)
set_control_max(value.get_float());
+ else if ( (key == "ingen:toggled") && value.type() == Atom::BOOL)
+ set_toggled(value.get_bool());
}