mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
create_action_group -> get_or_create_action_group
Since adding an action-groups hides existing actions with the same name,
this adds a way to look up actions first.
This fixes an issue introduced in 6af51b52ff (both window_manager.cc
and ardour_ui_ed.cc use the "Window" group.
This commit is contained in:
parent
2d595b90d7
commit
d6d1074565
1 changed files with 7 additions and 0 deletions
|
|
@ -1153,6 +1153,13 @@ ActionMap::find_action (const string& name)
|
|||
RefPtr<ActionGroup>
|
||||
ActionMap::create_action_group (const string& name)
|
||||
{
|
||||
Glib::ListHandle<Glib::RefPtr<ActionGroup> > agl = ActionManager::ui_manager->get_action_groups ();
|
||||
for (Glib::ListHandle<Glib::RefPtr<ActionGroup> >::iterator i = agl.begin (); i != agl.end (); ++i) {
|
||||
if ((*i)->get_name () == name) {
|
||||
return *i;
|
||||
}
|
||||
}
|
||||
|
||||
RefPtr<ActionGroup> g = ActionGroup::create (name);
|
||||
|
||||
/* this is one of the places where our own Action management code
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue