diff options
author | Robin Gareus <robin@gareus.org> | 2015-10-28 18:58:46 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-10-28 18:58:46 +0100 |
commit | dbf28e320c899fcf5224518ff59a23e40ca717a1 (patch) | |
tree | d5775e997bfc616818f0d6b161f052e8cabd61f6 /gtk2_ardour/route_time_axis.cc | |
parent | 661ffe75769a98d58d758c8b304825464858f123 (diff) |
don't display hidden automation-controls.
Diffstat (limited to 'gtk2_ardour/route_time_axis.cc')
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 16 |
1 files changed, 11 insertions, 5 deletions
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<Processor> 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<Processor> p string name = processor->describe_parameter (*i); + if (name.begin == X_("hidden")) { + continue; + } + items.push_back (CheckMenuElem (name)); mitem = dynamic_cast<Gtk::CheckMenuItem*> (&items.back()); @@ -2389,6 +2388,13 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> 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 |