summaryrefslogtreecommitdiff
path: root/gtk2_ardour/lv2_plugin_ui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-10-28 04:06:14 +0100
committerRobin Gareus <robin@gareus.org>2015-10-28 04:06:14 +0100
commit5dd5bf0f706e5912383bf38fcd7635b42fc6ec4a (patch)
tree1ced235147af24f37201070fd57e36b36754f8a7 /gtk2_ardour/lv2_plugin_ui.cc
parent997f47360d35dad3347861e389166149cbd6a5f0 (diff)
notify LV2 GUIs about port-changes when loading presets
Diffstat (limited to 'gtk2_ardour/lv2_plugin_ui.cc')
-rw-r--r--gtk2_ardour/lv2_plugin_ui.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc
index 572cdfb671..20f59b5e83 100644
--- a/gtk2_ardour/lv2_plugin_ui.cc
+++ b/gtk2_ardour/lv2_plugin_ui.cc
@@ -160,6 +160,19 @@ LV2PluginUI::stop_updating(GdkEventAny*)
}
void
+LV2PluginUI::queue_port_update()
+{
+ const uint32_t num_ports = _lv2->num_ports();
+ for (uint32_t i = 0; i < num_ports; ++i) {
+ bool ok;
+ uint32_t port = _lv2->nth_parameter(i, ok);
+ if (ok) {
+ _updates.insert (port);
+ }
+ }
+}
+
+void
LV2PluginUI::output_update()
{
//cout << "output_update" << endl;
@@ -233,6 +246,8 @@ LV2PluginUI::LV2PluginUI(boost::shared_ptr<PluginInsert> pi,
_ardour_buttons_box.pack_end (add_button, false, false);
_ardour_buttons_box.pack_end (_preset_combo, false, false);
_ardour_buttons_box.pack_end (_preset_modified, false, false);
+
+ plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&LV2PluginUI::queue_port_update, this), gui_context ());
}
void