summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-03-25 21:34:45 +0100
committerRobin Gareus <robin@gareus.org>2020-03-25 21:38:44 +0100
commit53c666f1b8e7b0ed1a24f0623b688b89f9a39376 (patch)
tree0cd8eae137a44879ed400677c6ce8bf8456333d8
parent4a24cc5083fd0b693ef09d29b8e42fb4d5aded3e (diff)
Add restrictions for aux send cut/copy/paste & DnD
This prevents adding duplicate sends via copy/paste, or creating invalid aux-send in the destination bus.
-rw-r--r--gtk2_ardour/processor_box.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 16f580c6d9..f92c6c9209 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -3422,6 +3422,11 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
continue;
}
+ /* compare to ProcessorBox::build_possible_aux_menu */
+ if (_route->is_monitor () || _route->is_foldbackbus ()) {
+ continue;
+ }
+
boost::shared_ptr<Pannable> sendpan(new Pannable (*_session));
XMLNode n (**niter);
InternalSend* s = new InternalSend (*_session, sendpan, _route->mute_master(),
@@ -3432,6 +3437,14 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
return;
}
+ boost::shared_ptr<Route> target = s->target_route();
+
+ if (_route->internal_send_for (target) || target == _route) {
+ /* aux-send to target already exists */
+ delete s;
+ continue;
+ }
+
p.reset (s);
} else if (type->value() == "send") {