Restore connections when using templates
This also fixes an issue when duplicating tracks. Saved connections were ignored and tracks were auto-connected.
This commit is contained in:
parent
6f5d3d8dd9
commit
98bfede1fc
|
@ -3113,7 +3113,7 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (!ret.empty()) {
|
if (!ret.empty()) {
|
||||||
add_routes (ret, true, true, insert_at);
|
add_routes (ret, false, false, insert_at);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ret.empty()) {
|
if (!ret.empty()) {
|
||||||
|
@ -3128,6 +3128,25 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i
|
||||||
(*x)->remove_monitor_send ();
|
(*x)->remove_monitor_send ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* reconnect ports using information from state */
|
||||||
|
for (auto const& wio : (*x)->all_inputs ()) {
|
||||||
|
boost::shared_ptr<IO> io = wio.lock();
|
||||||
|
if (!io) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (auto const& p : io->ports()) {
|
||||||
|
p->reconnect ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (auto const& wio : (*x)->all_outputs ()) {
|
||||||
|
boost::shared_ptr<IO> io = wio.lock();
|
||||||
|
if (!io) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (auto const& p : io->ports()) {
|
||||||
|
p->reconnect ();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user