diff options
author | Carl Hetherington <carl@carlh.net> | 2009-11-23 18:08:29 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-11-23 18:08:29 +0000 |
commit | 608d1cc7b02683c387ed960896ecffff3745cd93 (patch) | |
tree | a4896ffdc29999c01b1b1656e45616c0c4a400f4 /gtk2_ardour/processor_box.cc | |
parent | 47c88ff7d1556bc87cb83db60a6ab0a9172538c5 (diff) |
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
Diffstat (limited to 'gtk2_ardour/processor_box.cc')
-rw-r--r-- | gtk2_ardour/processor_box.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index f0a055057a..964ed9510c 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -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); } } |