From dbf28e320c899fcf5224518ff59a23e40ca717a1 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 28 Oct 2015 18:58:46 +0100 Subject: don't display hidden automation-controls. --- gtk2_ardour/route_time_axis.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 41d7905bf1..72ab584244 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -2333,14 +2333,9 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr p } if (x == processor_automation.end()) { - rai = new ProcessorAutomationInfo (processor); - processor_automation.push_back (rai); - } else { - rai = *x; - } /* any older menu was deleted at the top of processors_changed() @@ -2363,6 +2358,10 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr p string name = processor->describe_parameter (*i); + if (name.begin == X_("hidden")) { + continue; + } + items.push_back (CheckMenuElem (name)); mitem = dynamic_cast (&items.back()); @@ -2389,6 +2388,13 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr p mitem->signal_toggled().connect (sigc::bind (sigc::mem_fun(*this, &RouteTimeAxisView::processor_menu_item_toggled), rai, pan)); } + if (items.size() > 0) { + processor_automation.push_back (rai); + } else { + delete rai; + return; + } + /* add the menu for this processor, because the subplugin menu is always cleared at the top of processors_changed(). this is the result of some poor design in gtkmm and/or -- cgit v1.2.3