summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-10-03 18:16:42 +0200
committerRobin Gareus <robin@gareus.org>2018-10-03 18:16:42 +0200
commitfe4df1bee3ec3a863bbb208914b5a6c79494be33 (patch)
tree6b7aebb840d65c855371795554661eab0c112d23
parent35243c9b3ebae89a1c3183d5779f6146271aa55e (diff)
Prevent adding aux-sends to master or monitor
-rw-r--r--gtk2_ardour/processor_box.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 9beb733617..1eb68259b6 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -2025,9 +2025,15 @@ ProcessorBox::build_possible_aux_menu ()
MenuList& items = menu->items();
for (RouteList::iterator r = rl->begin(); r != rl->end(); ++r) {
- if (!_route->internal_send_for (*r) && *r != _route) {
- items.push_back (MenuElemNoMnemonic ((*r)->name(), sigc::bind (sigc::ptr_fun (ProcessorBox::rb_choose_aux), boost::weak_ptr<Route>(*r))));
+ if ((*r)->is_master() || (*r)->is_monitor () || *r == _route) {
+ /* don't allow sending to master or monitor or to self */
+ continue;
+ }
+ if (_route->internal_send_for (*r)) {
+ /* aux-send to target already exists */
+ continue;
}
+ items.push_back (MenuElemNoMnemonic ((*r)->name(), sigc::bind (sigc::ptr_fun (ProcessorBox::rb_choose_aux), boost::weak_ptr<Route>(*r))));
}
return menu;