From 406d7376bf8faf0965fb87feaf6401962d357962 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 14 Aug 2008 20:22:45 +0000 Subject: Only show GUI menu items for nodes with available GUIs. git-svn-id: http://svn.drobilla.net/lad/ingen@1378 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/NodeMenu.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/libs/gui/NodeMenu.cpp') diff --git a/src/libs/gui/NodeMenu.cpp b/src/libs/gui/NodeMenu.cpp index 6051ec7c..05139540 100644 --- a/src/libs/gui/NodeMenu.cpp +++ b/src/libs/gui/NodeMenu.cpp @@ -64,7 +64,11 @@ NodeMenu::init(SharedPtr node) _embed_gui_menuitem->signal_toggled().connect(sigc::mem_fun(this, &NodeMenu::on_menu_embed_gui)); - if ((!node->plugin()) || node->plugin()->type() != PluginModel::LV2) { + const PluginModel* plugin = dynamic_cast(node->plugin()); + if (plugin && plugin->type() == PluginModel::LV2 && plugin->has_ui()) { + _popup_gui_menuitem->show(); + _embed_gui_menuitem->show(); + } else { _popup_gui_menuitem->hide(); _embed_gui_menuitem->hide(); } -- cgit v1.2.1