update_diskstream_display ();
subplugin_menu.items().clear ();
- _route->foreach_processor (mem_fun (*this, &RouteTimeAxisView::add_processor_to_subplugin_menu));
+ _route->foreach_processor (bind (mem_fun (*this, &RouteTimeAxisView::add_processor_to_subplugin_menu), _route));
_route->foreach_processor (mem_fun (*this, &RouteTimeAxisView::add_existing_processor_automation_curves));
reset_processor_automation_curves ();
}
subplugin_menu.detach();
automation_items.push_back (MenuElem (_("Plugins"), subplugin_menu));
+ automation_items.back().set_sensitive (!subplugin_menu.items().empty());
map<Evoral::Parameter, RouteAutomationNode*>::iterator i;
for (i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
void
-RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> p)
+RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> p, boost::weak_ptr<Route> r)
{
boost::shared_ptr<Processor> processor (p.lock ());
- if (!processor) {
+ boost::shared_ptr<Route> route (r.lock ());
+ if (!processor || !route) {
+ return;
+ }
+
+ if (processor == route->amp ()) {
+ /* don't add an entry for the amp processor */
return;
}
subplugin_menu.items().clear ();
- _route->foreach_processor (mem_fun (*this, &RouteTimeAxisView::add_processor_to_subplugin_menu));
+ _route->foreach_processor (bind (mem_fun (*this, &RouteTimeAxisView::add_processor_to_subplugin_menu), _route));
_route->foreach_processor (mem_fun (*this, &RouteTimeAxisView::add_existing_processor_automation_curves));
for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ) {
delete g;
}
}
-
void processors_changed ();
- void add_processor_to_subplugin_menu (boost::weak_ptr<ARDOUR::Processor>);
+ void add_processor_to_subplugin_menu (boost::weak_ptr<ARDOUR::Processor>, boost::weak_ptr<ARDOUR::Route>);
void remove_processor_automation_node (ProcessorAutomationNode* pan);
void processor_menu_item_toggled (RouteTimeAxisView::ProcessorAutomationInfo*,