summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/bindings.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-11 15:32:55 +0100
committerRobin Gareus <robin@gareus.org>2017-03-11 15:33:24 +0100
commitd6d1074565547f40dc46be7e6465c1085d639ce7 (patch)
tree4e70ec924e89cf483521f45b8ede5e7fcf2630ef /libs/gtkmm2ext/bindings.cc
parent2d595b90d76be2aa6874da23fc78c29219063247 (diff)
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 6af51b52ffd6 (both window_manager.cc and ardour_ui_ed.cc use the "Window" group.
Diffstat (limited to 'libs/gtkmm2ext/bindings.cc')
-rw-r--r--libs/gtkmm2ext/bindings.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/bindings.cc b/libs/gtkmm2ext/bindings.cc
index 5098b9399e..16b0b004bd 100644
--- a/libs/gtkmm2ext/bindings.cc
+++ b/libs/gtkmm2ext/bindings.cc
@@ -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