Fix route-templates with external sends
This commit is contained in:
parent
1fa2d15a9d
commit
0c368499f8
@ -576,6 +576,21 @@ IO::set_state (const XMLNode& node, int version)
|
|||||||
if (create_ports (node, version)) {
|
if (create_ports (node, version)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if (_sendish && _direction == Output) {
|
||||||
|
/* ignore <Port name="..."> from XML for sends, but use the names
|
||||||
|
* ::ensure_ports_locked() creates port using ::build_legal_port_name()
|
||||||
|
* This is needed to properly restore connections when creating
|
||||||
|
* external sends from templates because the IO name changes.
|
||||||
|
*/
|
||||||
|
PortSet::iterator i = _ports.begin();
|
||||||
|
XMLNodeConstIterator x = node.children().begin();
|
||||||
|
for (; i != _ports.end(), x != node.children().end(); ++i, ++x) {
|
||||||
|
if ((*x)->name() == "Port") {
|
||||||
|
(*x)->remove_property (X_("name"));
|
||||||
|
(*x)->set_property (X_("name"), i->name());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// after create_ports, updates names
|
// after create_ports, updates names
|
||||||
if (node.get_property ("pretty-name", name)) {
|
if (node.get_property ("pretty-name", name)) {
|
||||||
|
@ -3439,6 +3439,14 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i
|
|||||||
(*i)->remove_property (X_("name"));
|
(*i)->remove_property (X_("name"));
|
||||||
(*i)->set_property ("bitslot", bitslot);
|
(*i)->set_property ("bitslot", bitslot);
|
||||||
(*i)->set_property ("name", name);
|
(*i)->set_property ("name", name);
|
||||||
|
XMLNodeList io_kids = (*i)->children ();
|
||||||
|
for (XMLNodeList::iterator j = io_kids.begin(); j != io_kids.end(); ++j) {
|
||||||
|
if ((*j)->name() != X_("IO")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
(*j)->remove_property (X_("name"));
|
||||||
|
(*j)->set_property ("name", name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (type && type->value() == X_("intreturn")) {
|
else if (type && type->value() == X_("intreturn")) {
|
||||||
(*i)->remove_property (X_("bitslot"));
|
(*i)->remove_property (X_("bitslot"));
|
||||||
|
Loading…
Reference in New Issue
Block a user