Retain custom internal-send name on session re-load

This commit is contained in:
Robin Gareus 2020-03-02 21:54:38 +01:00
parent 6e0062d549
commit 82541b33a4
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
2 changed files with 6 additions and 4 deletions

View file

@ -81,7 +81,7 @@ private:
void send_to_property_changed (const PBD::PropertyChange&); void send_to_property_changed (const PBD::PropertyChange&);
int connect_when_legal (); int connect_when_legal ();
void init_gain (); void init_gain ();
int use_target (boost::shared_ptr<Route>); int use_target (boost::shared_ptr<Route>, bool update_name = true);
void target_io_changed (); void target_io_changed ();
}; };

View file

@ -88,7 +88,7 @@ InternalSend::init_gain ()
} }
int int
InternalSend::use_target (boost::shared_ptr<Route> sendto) InternalSend::use_target (boost::shared_ptr<Route> sendto, bool update_name)
{ {
if (_send_to) { if (_send_to) {
_send_to->remove_send_from_internal_return (this); _send_to->remove_send_from_internal_return (this);
@ -107,7 +107,9 @@ InternalSend::use_target (boost::shared_ptr<Route> sendto)
reset_panner (); reset_panner ();
set_name (sendto->name()); if (update_name) {
set_name (sendto->name());
}
_send_to_id = _send_to->id(); _send_to_id = _send_to->id();
target_connections.drop_connections (); target_connections.drop_connections ();
@ -360,7 +362,7 @@ InternalSend::connect_when_legal ()
return -1; return -1;
} }
return use_target (sendto); return use_target (sendto, false);
} }
bool bool