mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Hide create new item from Group Tab context menu
Creating a new empty group from the group tab area just looks broken since nothing visible happens, so hide this item when the context menu is triggered from this location.
This commit is contained in:
parent
f5b3ad18cf
commit
cb0b22cb79
2 changed files with 7 additions and 4 deletions
|
|
@ -144,7 +144,7 @@ GroupTabs::on_button_press_event (GdkEventButton* ev)
|
|||
RouteGroupDialog d (g, false);
|
||||
d.do_run ();
|
||||
} else {
|
||||
Menu* m = get_menu (g);
|
||||
Menu* m = get_menu (g, true);
|
||||
if (m) {
|
||||
m->popup (ev->button, ev->time);
|
||||
}
|
||||
|
|
@ -301,7 +301,7 @@ GroupTabs::click_to_tab (double c, list<Tab>::iterator* prev, list<Tab>::iterato
|
|||
}
|
||||
|
||||
Gtk::Menu*
|
||||
GroupTabs::get_menu (RouteGroup* g)
|
||||
GroupTabs::get_menu (RouteGroup* g, bool TabArea)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
|
|
@ -317,7 +317,10 @@ GroupTabs::get_menu (RouteGroup* g)
|
|||
_menu->set_name ("ArdourContextMenu");
|
||||
MenuList& items = _menu->items();
|
||||
|
||||
items.push_back (MenuElem (_("Create New Group ..."), hide_return (sigc::mem_fun(*this, &GroupTabs::create_and_add_group))));
|
||||
if (!TabArea) {
|
||||
items.push_back (MenuElem (_("Create New Group ..."), hide_return (sigc::mem_fun(*this, &GroupTabs::create_and_add_group))));
|
||||
}
|
||||
|
||||
items.push_back (MenuElem (_("Create New Group From"), *new_from));
|
||||
|
||||
if (g) {
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public:
|
|||
/** @param g Route group, or 0.
|
||||
* @return Menu to be popped up on right-click over the given route group.
|
||||
*/
|
||||
Gtk::Menu* get_menu (ARDOUR::RouteGroup* g);
|
||||
Gtk::Menu* get_menu (ARDOUR::RouteGroup* g, bool tabArea = false);
|
||||
|
||||
void run_new_group_dialog (ARDOUR::RouteList const &);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue