diff options
author | David Robillard <d@drobilla.net> | 2008-08-20 00:35:30 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-08-20 00:35:30 +0000 |
commit | a0872caf0097908464f3ef3a6a5e3635296b95e8 (patch) | |
tree | 37797f543eb2f94b72a024ec0b6b327afdf59dca /src/libs/gui/NodeModule.cpp | |
parent | 5c920e569bce21235450bf677cd00a160a10ad38 (diff) | |
download | ingen-a0872caf0097908464f3ef3a6a5e3635296b95e8.tar.gz ingen-a0872caf0097908464f3ef3a6a5e3635296b95e8.tar.bz2 ingen-a0872caf0097908464f3ef3a6a5e3635296b95e8.zip |
Fix Blob atom copy contruction/size/etc stuff.
Fix LV2 UI events (i.e. make klaviatur work again).
git-svn-id: http://svn.drobilla.net/lad/ingen@1452 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui/NodeModule.cpp')
-rw-r--r-- | src/libs/gui/NodeModule.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp index b3898b94..fc6b13de 100644 --- a/src/libs/gui/NodeModule.cpp +++ b/src/libs/gui/NodeModule.cpp @@ -104,8 +104,10 @@ NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> n void NodeModule::value_changed(uint32_t index, const Atom& value) { - if (value.type() == Atom::FLOAT) { - float control = value.get_float(); + float control = 0.0f; + switch (value.type()) { + case Atom::FLOAT: + control = value.get_float(); if (_plugin_ui) { SLV2UIInstance inst = _plugin_ui->instance(); const LV2UI_Descriptor* ui_descriptor = slv2_ui_instance_get_descriptor(inst); @@ -113,8 +115,12 @@ NodeModule::value_changed(uint32_t index, const Atom& value) if (ui_descriptor->port_event) ui_descriptor->port_event(ui_handle, index, 4, 0, &control); } - } else { - cerr << "WARNING: Unknown value type " << (int)value.type() << endl; + break; + case Atom::STRING: + cout << "Port value type is a string? (\"" << value.get_string() << "\")" << endl; + break; + default: + break; } } |