From 557f9d42641f7f602f9fec4d2f3aae50b893de6b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 24 Oct 2015 22:14:06 +0000 Subject: Fix LV2 UIs that send during instantiation git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5780 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/App.cpp | 4 +++- src/gui/NodeModule.cpp | 20 ++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) (limited to 'src/gui') diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 0c7aea8c..2624d1e9 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -234,7 +234,9 @@ App::set_property(const Raul::URI& subject, feedback and bandwidth wastage, see Delta.cpp). So, assume everything went as planned here and fire the signal ourselves as if the server feedback came back immediately. */ - _client->signal_property_change().emit(subject, key, value); + if (key != uris().ingen_activity) { + _client->signal_property_change().emit(subject, key, value); + } } void diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index ae9a997d..4e149bbf 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -235,14 +235,18 @@ NodeModule::embed_gui(bool embed) _plugin_ui->signal_property_changed().connect( sigc::mem_fun(app(), &App::set_property)); - GtkWidget* c_widget = (GtkWidget*)_plugin_ui->get_widget(); - _gui_widget = Glib::wrap(c_widget); - - Gtk::Container* container = new Gtk::EventBox(); - container->set_name("IngenEmbeddedUI"); - container->set_border_width(4.0); - container->add(*_gui_widget); - Ganv::Module::embed(container); + if (!_plugin_ui->instantiate()) { + app().log().error("Failed to instantiate LV2 UI\n"); + } else { + GtkWidget* c_widget = (GtkWidget*)_plugin_ui->get_widget(); + _gui_widget = Glib::wrap(c_widget); + + Gtk::Container* container = new Gtk::EventBox(); + container->set_name("IngenEmbeddedUI"); + container->set_border_width(4.0); + container->add(*_gui_widget); + Ganv::Module::embed(container); + } } else { app().log().error("Failed to create LV2 UI\n"); } -- cgit v1.2.1