Don't offer to make an internal send to ourselves or to a route that we already have one for. Don't offer an empty aux sends menu.
git-svn-id: svn://localhost/ardour2/branches/3.0@6157 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
47c88ff7d1
commit
608d1cc7b0
@ -303,7 +303,7 @@ ProcessorBox::build_possible_aux_menu ()
|
||||
MenuList& items = menu->items();
|
||||
|
||||
for (RouteList::iterator r = rl->begin(); r != rl->end(); ++r) {
|
||||
if (!(*r)->internal_send_for (*r)) {
|
||||
if (!_route->internal_send_for (*r) && *r != _route) {
|
||||
items.push_back (MenuElem ((*r)->name(), bind (sigc::ptr_fun (ProcessorBox::rb_choose_aux), boost::weak_ptr<Route>(*r))));
|
||||
}
|
||||
}
|
||||
@ -338,11 +338,13 @@ ProcessorBox::show_processor_menu (gint arg)
|
||||
|
||||
if (aux_menu_item) {
|
||||
Menu* m = build_possible_aux_menu();
|
||||
if (m) {
|
||||
if (m && !m->items().empty()) {
|
||||
aux_menu_item->set_submenu (*m);
|
||||
aux_menu_item->set_sensitive (true);
|
||||
} else {
|
||||
/* stupid gtkmm: we need to pass a null reference here */
|
||||
gtk_menu_item_set_submenu (aux_menu_item->gobj(), 0);
|
||||
aux_menu_item->set_sensitive (false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user