mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Fix handling of the mapping between parameters and automation CheckMenuItems. Should fix #3206, #3215 and the remainder of #3228.
git-svn-id: svn://localhost/ardour2/branches/3.0@7245 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
2067937ecf
commit
8dd31447be
5 changed files with 62 additions and 20 deletions
|
|
@ -264,6 +264,7 @@ RouteTimeAxisView::post_construct ()
|
|||
|
||||
update_diskstream_display ();
|
||||
|
||||
_subplugin_menu_map.clear ();
|
||||
subplugin_menu.items().clear ();
|
||||
_route->foreach_processor (sigc::mem_fun (*this, &RouteTimeAxisView::add_processor_to_subplugin_menu));
|
||||
_route->foreach_processor (sigc::mem_fun (*this, &RouteTimeAxisView::add_existing_processor_automation_curves));
|
||||
|
|
@ -397,6 +398,7 @@ RouteTimeAxisView::build_automation_action_menu ()
|
|||
|
||||
detach_menu (subplugin_menu);
|
||||
|
||||
_main_automation_menu_map.clear ();
|
||||
delete automation_action_menu;
|
||||
automation_action_menu = new Menu;
|
||||
|
||||
|
|
@ -1689,8 +1691,9 @@ RouteTimeAxisView::show_existing_automation ()
|
|||
i->second->get_state_node()->add_property ("shown", X_("yes"));
|
||||
|
||||
Gtk::CheckMenuItem* menu = automation_child_menu_item (i->first);
|
||||
assert (menu);
|
||||
menu->set_active(true);
|
||||
if (menu) {
|
||||
menu->set_active(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2008,7 +2011,7 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> p
|
|||
items.push_back (CheckMenuElem (name));
|
||||
mitem = dynamic_cast<CheckMenuItem*> (&items.back());
|
||||
|
||||
_parameter_menu_map[*i] = mitem;
|
||||
_subplugin_menu_map[*i] = mitem;
|
||||
|
||||
if (has_visible_automation.find((*i)) != has_visible_automation.end()) {
|
||||
mitem->set_active(true);
|
||||
|
|
@ -2089,6 +2092,7 @@ RouteTimeAxisView::processors_changed (RouteProcessorChange c)
|
|||
(*i)->valid = false;
|
||||
}
|
||||
|
||||
_subplugin_menu_map.clear ();
|
||||
subplugin_menu.items().clear ();
|
||||
|
||||
_route->foreach_processor (sigc::mem_fun (*this, &RouteTimeAxisView::add_processor_to_subplugin_menu));
|
||||
|
|
@ -2373,10 +2377,15 @@ RouteTimeAxisView::set_button_names ()
|
|||
Gtk::CheckMenuItem*
|
||||
RouteTimeAxisView::automation_child_menu_item (Evoral::Parameter param)
|
||||
{
|
||||
ParameterMenuMap::iterator i = _parameter_menu_map.find (param);
|
||||
if (i == _parameter_menu_map.end()) {
|
||||
return 0;
|
||||
ParameterMenuMap::iterator i = _main_automation_menu_map.find (param);
|
||||
if (i != _main_automation_menu_map.end()) {
|
||||
return i->second;
|
||||
}
|
||||
|
||||
i = _subplugin_menu_map.find (param);
|
||||
if (i != _subplugin_menu_map.end()) {
|
||||
return i->second;
|
||||
}
|
||||
|
||||
return i->second;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue