Fix send panner when copying sends
* Unlinked panners now retain their state during copy/paste. * Linked send panners can no longer override parent route panning * Unlinked panner state is retained across link/unlink.
This commit is contained in:
parent
9c06f693e9
commit
983c577945
@ -70,6 +70,7 @@ public:
|
||||
|
||||
boost::shared_ptr<Panner> panner() const { return _panner; }
|
||||
boost::shared_ptr<Pannable> pannable() const { return _panlinked ? _pannable_route : _pannable_internal; }
|
||||
boost::shared_ptr<Pannable> unlinked_pannable () const { return _pannable_internal; }
|
||||
|
||||
bool bypassed () const;
|
||||
void set_bypassed (bool);
|
||||
|
@ -375,8 +375,8 @@ Delivery::state ()
|
||||
|
||||
if (_panshell) {
|
||||
node.add_child_nocopy (_panshell->get_state ());
|
||||
if (_panshell->pannable()) {
|
||||
node.add_child_nocopy (_panshell->pannable()->get_state ());
|
||||
if (_panshell->unlinked_pannable ()) {
|
||||
node.add_child_nocopy (_panshell->unlinked_pannable()->get_state ());
|
||||
}
|
||||
}
|
||||
|
||||
@ -405,8 +405,9 @@ Delivery::set_state (const XMLNode& node, int version)
|
||||
reset_panner ();
|
||||
|
||||
XMLNode* pannnode = node.child (X_("Pannable"));
|
||||
|
||||
if (_panshell && _panshell->panner() && pannnode) {
|
||||
_panshell->pannable()->set_state (*pannnode, version);
|
||||
_panshell->unlinked_pannable()->set_state (*pannnode, version);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -395,6 +395,15 @@ InternalSend::set_state (const XMLNode& node, int version)
|
||||
{
|
||||
init_gain ();
|
||||
|
||||
/* Allow Delivery::set_state() to restore pannable state when
|
||||
* copy/pasting Aux sends.
|
||||
*
|
||||
* At this point in time there is no target-bus. So when
|
||||
* Delivery::set_state() calls reset_panner(), the pannable
|
||||
* is dropped, before the panner state can be restored.
|
||||
*/
|
||||
defer_pan_reset ();
|
||||
|
||||
Send::set_state (node, version);
|
||||
|
||||
if (node.get_property ("target", _send_to_id)) {
|
||||
@ -409,6 +418,7 @@ InternalSend::set_state (const XMLNode& node, int version)
|
||||
connect_when_legal ();
|
||||
}
|
||||
}
|
||||
allow_pan_reset ();
|
||||
|
||||
if (!is_foldback ()) {
|
||||
node.get_property (X_("allow-feedback"), _allow_feedback);
|
||||
|
Loading…
Reference in New Issue
Block a user