Don't automatically open plugin-GUI if there are no controls
authorRobin Gareus <robin@gareus.org>
Tue, 30 Jan 2018 11:40:22 +0000 (12:40 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 30 Jan 2018 11:40:22 +0000 (12:40 +0100)
gtk2_ardour/processor_box.cc

index 9103db059758dca4c1ca9503d32a7ac9a7eedabd..504ad10f3261b475ce75e7f7fffc3cdb0f202787 100644 (file)
@@ -2396,9 +2396,13 @@ ProcessorBox::use_plugins (const SelectedPlugins& plugins)
                        return true;
                        // XXX SHAREDPTR delete plugin here .. do we even need to care?
                } else if (plugins.size() == 1 && UIConfiguration::instance().get_open_gui_after_adding_plugin()) {
-                       if (boost::dynamic_pointer_cast<PluginInsert>(processor)->plugin()->has_inline_display() && UIConfiguration::instance().get_prefer_inline_over_gui()) {
-                               ;
-                       } else if (_session->engine().connected () && processor_can_be_edited (processor)) {
+                       if (processor->what_can_be_automated ().size () == 0) {
+                               ; /* plugin without controls, don't show ui */
+                       }
+                       else if (boost::dynamic_pointer_cast<PluginInsert>(processor)->plugin()->has_inline_display() && UIConfiguration::instance().get_prefer_inline_over_gui()) {
+                               ; /* only show inline display */
+                       }
+                       else if (_session->engine().connected () && processor_can_be_edited (processor)) {
                                if ((*p)->has_editor ()) {
                                        edit_processor (processor);
                                } else if (boost::dynamic_pointer_cast<PluginInsert>(processor)->plugin()->parameter_count() > 0) {