From d6d1074565547f40dc46be7e6465c1085d639ce7 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 11 Mar 2017 15:32:55 +0100 Subject: [PATCH] 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. --- libs/gtkmm2ext/bindings.cc | 7 +++++++ 1 file changed, 7 insertions(+) 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 ActionMap::create_action_group (const string& name) { + Glib::ListHandle > agl = ActionManager::ui_manager->get_action_groups (); + for (Glib::ListHandle >::iterator i = agl.begin (); i != agl.end (); ++i) { + if ((*i)->get_name () == name) { + return *i; + } + } + RefPtr g = ActionGroup::create (name); /* this is one of the places where our own Action management code