From 2bf4fd17968d6ada93d2d53adc42f73ba83eeb8c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 13 Nov 2025 00:11:07 +0100 Subject: [PATCH] Don't show empty GUI if instrument plugin has no custom view --- gtk2_ardour/editor.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 5431dfef52..350a9da7d9 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -4783,17 +4783,20 @@ Editor::maybe_show_instrument_plugin (std::shared_ptr mt) if (!UIConfiguration::instance().get_open_gui_after_creating_instrument_track ()) { return; } - std::shared_ptr iproc = mt->the_instrument(); - if (!iproc) { + std::shared_ptr pi = std::dynamic_pointer_cast (mt->the_instrument ()); + if (!pi) { + return; + } + if (pi->what_can_be_automated ().size () == 0) { return; } - ProcessorWindowProxy* proxy = iproc->window_proxy(); + ProcessorWindowProxy* proxy = pi->window_proxy(); if (!proxy) { return; } - proxy->set_custom_ui_mode (true); + proxy->set_custom_ui_mode (pi->plugin ()->has_editor ()); proxy->show_the_right_window (); Gtk::Window* tlw = dynamic_cast (edit_controls_vbox.get_toplevel ()); if (tlw) {