diff --git a/gtk2_ardour/waves_dropdown.cc b/gtk2_ardour/waves_dropdown.cc index 2f56a714da..f4bbccdd0c 100644 --- a/gtk2_ardour/waves_dropdown.cc +++ b/gtk2_ardour/waves_dropdown.cc @@ -84,7 +84,14 @@ WavesDropdown::add_radio_menu_item (const std::string& item, void* cookie) { Gtk::Menu_Helpers::MenuList& items = _menu.items (); - items.push_back (Gtk::Menu_Helpers::RadioMenuElem (_radio_menu_items_group, item, sigc::bind (sigc::mem_fun(*this, &WavesDropdown::_on_menu_item), items.size (), cookie))); + if (items.empty()) { + Gtk::RadioMenuItem::Group group; + items.push_back (Gtk::Menu_Helpers::RadioMenuElem (group, item, sigc::bind (sigc::mem_fun(*this, &WavesDropdown::_on_menu_item), items.size (), cookie))); + } else { + Gtk::RadioMenuItem* first = dynamic_cast (&_menu.items ().front ()); + Gtk::RadioMenuItem::Group group = first->get_group(); + items.push_back (Gtk::Menu_Helpers::RadioMenuElem (group, item, sigc::bind (sigc::mem_fun(*this, &WavesDropdown::_on_menu_item), items.size (), cookie))); + } Gtk::RadioMenuItem& menuitem = *dynamic_cast (&_menu.items ().back ()); ensure_style(); diff --git a/gtk2_ardour/waves_dropdown.h b/gtk2_ardour/waves_dropdown.h index 756990167e..e810c87f68 100644 --- a/gtk2_ardour/waves_dropdown.h +++ b/gtk2_ardour/waves_dropdown.h @@ -46,7 +46,6 @@ class WavesDropdown : public WavesIconButton private: Gtk::Menu _menu; int _selected_item_number; - Gtk::RadioMenuItem::Group _radio_menu_items_group; void _on_menu_item (int item_number, void* cookie); void _on_popup_menu_position (int& x, int& y, bool& push_in); bool _on_mouse_pressed (GdkEventButton*);