diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc index 23ebdbaa0a..2897b3c1ac 100644 --- a/gtk2_ardour/generic_pluginui.cc +++ b/gtk2_ardour/generic_pluginui.cc @@ -89,6 +89,7 @@ GenericPluginUI::GenericPluginUI (std::shared_ptr pib, bool scro , automation_menu (0) , is_scrollable(scrollable) , want_ctrl_only(ctrls_only) + , _empty (true) , _plugin_pianokeyboard_expander (_("MIDI Keyboard (audition only)")) , _piano (0) , _piano_velocity (*manage (new Adjustment (100, 1, 127, 1, 16))) @@ -401,6 +402,7 @@ GenericPluginUI::build () if (has_descriptive_presets ()) { preset_gui = new PluginPresetsUI (_pi); // XXX hpacker.pack_start (*preset_gui, true, true); + _empty = false; if (is_scrollable) { preset_gui->show_all (); GtkRequisition request = preset_gui->size_request(); @@ -624,6 +626,9 @@ GenericPluginUI::automatic_layout (const std::vector& control_uis) box->pack_start (*cui, false, false); } + if (i > 0) { + _empty = false; + } if (is_scrollable && i > 0) { prefheight = 30 * i * UIConfiguration::instance().get_ui_scale(); } @@ -637,6 +642,7 @@ GenericPluginUI::automatic_layout (const std::vector& control_uis) delete button_table; } else { button_table->show_all (); + _empty = false; } if (!output_table->children().empty()) { @@ -646,6 +652,7 @@ GenericPluginUI::automatic_layout (const std::vector& control_uis) frame->add (*output_table); hpacker.pack_end (*frame, true, true); output_table->show_all (); + _empty = false; } else { delete output_table; } @@ -653,6 +660,7 @@ GenericPluginUI::automatic_layout (const std::vector& control_uis) if (!want_ctrl_only && plugin->has_inline_display () && plugin->inline_display_in_gui ()) { PluginDisplay* pd = manage (new PluginDisplay (plugin, 300)); hpacker.pack_end (*pd, true, true); + _empty = false; } show_all(); @@ -691,6 +699,8 @@ GenericPluginUI::build_midi_table () pgm_table->attach (*cui, col + 1, col + 2, row, row+1, SHRINK, SHRINK); } + _empty = false; + if (is_scrollable) { frame->show_all (); GtkRequisition request = frame->size_request(); diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h index 94c51c6196..8d6d6ff882 100644 --- a/gtk2_ardour/plugin_ui.h +++ b/gtk2_ardour/plugin_ui.h @@ -223,6 +223,7 @@ public: gint get_preferred_height () { return prefheight; } gint get_preferred_width () { return -1; } + bool empty () const { return _empty; } bool start_updating(GdkEventAny*); bool stop_updating(GdkEventAny*); @@ -236,6 +237,7 @@ private: gint prefheight; bool is_scrollable; bool want_ctrl_only; + bool _empty; struct MeterInfo { ArdourWidgets::FastMeter* meter;