13
0

L: auto-connect WTL session tracks to master

This is needed when loading sessions that were saved
while "Direct Out" was active.
This commit is contained in:
Robin Gareus 2024-06-12 20:18:25 +02:00
parent 5ec4792bf8
commit 814eecc5ff
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -2104,6 +2104,17 @@ Session::set_state (const XMLNode& node, int version)
}
}
if (version == 3001 && Profile->get_livetrax() && _master_out) {
std::shared_ptr<Bundle> b = _master_out->input()->bundle();
std::shared_ptr<RouteList const> r = routes.reader();
for (auto const& i : *r) {
std::shared_ptr<Track> tr = std::dynamic_pointer_cast<Track> (i);
if (tr) {
tr->output()->connect_ports_to_bundle (b, true, true, this);
}
}
}
if ((child = find_named_node (node, X_("Selection")))) {
_selection->set_state (*child, version);
}