13
0

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.
This commit is contained in:
Robin Gareus 2020-03-25 21:34:45 +01:00
parent 4a24cc5083
commit 53c666f1b8
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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") {