summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-02-02 16:14:11 +0000
committerDavid Robillard <d@drobilla.net>2013-02-02 16:14:11 +0000
commit05d020a36581fdc9c5038339e52208f7d9f3e60e (patch)
tree34e9bc4aa23fe501cbf8e83a98a55612625cc882 /src/gui
parentaac915f5389f8c94f767704bc7b0f363d38c9244 (diff)
downloadingen-05d020a36581fdc9c5038339e52208f7d9f3e60e.tar.gz
ingen-05d020a36581fdc9c5038339e52208f7d9f3e60e.tar.bz2
ingen-05d020a36581fdc9c5038339e52208f7d9f3e60e.zip
Fix truncation of atom events sent to plugin UIs.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5023 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/NodeModule.cpp15
-rw-r--r--src/gui/NodeModule.hpp1
2 files changed, 3 insertions, 13 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 51cbf038..1ddabdec 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -163,15 +163,6 @@ NodeModule::show_human_names(bool b)
}
void
-NodeModule::value_changed(uint32_t index, const Raul::Atom& value)
-{
- if (!_plugin_ui)
- return;
-
- _plugin_ui->port_event(index, value.size(), value.type(), value.get_body());
-}
-
-void
NodeModule::port_activity(uint32_t index, const Raul::Atom& value)
{
if (!_plugin_ui)
@@ -182,7 +173,7 @@ NodeModule::port_activity(uint32_t index, const Raul::Atom& value)
// FIXME: Well, this sucks...
LV2_Atom* atom = (LV2_Atom*)malloc(sizeof(LV2_Atom) + value.size());
atom->type = value.type();
- atom->size = value.type();
+ atom->size = value.size();
memcpy(LV2_ATOM_BODY(atom), value.get_body(), value.size());
_plugin_ui->port_event(
index, lv2_atom_total_size(atom), uris.atom_eventTransfer, atom);
@@ -259,7 +250,7 @@ NodeModule::new_port_view(SPtr<const PortModel> port)
app().world()->conf().option("human-names").get_bool());
port->signal_value_changed().connect(
- sigc::bind<0>(sigc::mem_fun(this, &NodeModule::value_changed),
+ sigc::bind<0>(sigc::mem_fun(this, &NodeModule::port_activity),
port->index()));
port->signal_activity().connect(
@@ -346,7 +337,7 @@ NodeModule::set_control_values()
uint32_t index = 0;
for (const auto& p : _block->ports()) {
if (app().can_control(p.get())) {
- value_changed(index, p->value());
+ port_activity(index, p->value());
}
++index;
}
diff --git a/src/gui/NodeModule.hpp b/src/gui/NodeModule.hpp
index f1521c5f..6edad27b 100644
--- a/src/gui/NodeModule.hpp
+++ b/src/gui/NodeModule.hpp
@@ -82,7 +82,6 @@ protected:
void new_port_view(SPtr<const Client::PortModel> port);
- void value_changed(uint32_t index, const Raul::Atom& value);
void port_activity(uint32_t index, const Raul::Atom& value);
void plugin_changed();
void set_control_values();