Ignore saved port-name when loading ctrl-surface state
In some cases old and/or conflicting port names were saved with the session (e.g. "Faderport" for FP1,8). Loading old sessions then merges this state into the config, which could lead to port-registration failure when the surfaces was enabled.
This commit is contained in:
parent
c212909282
commit
e0a6aba28d
|
@ -768,6 +768,7 @@ CC121::set_state (const XMLNode& node, int version)
|
|||
if ((child = node.child (X_("Input"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
boost::shared_ptr<ARDOUR::Port>(_input_port)->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
@ -775,6 +776,7 @@ CC121::set_state (const XMLNode& node, int version)
|
|||
if ((child = node.child (X_("Output"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
boost::shared_ptr<ARDOUR::Port>(_output_port)->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -800,6 +800,7 @@ FaderPort::set_state (const XMLNode& node, int version)
|
|||
if ((child = node.child (X_("Input"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
boost::shared_ptr<ARDOUR::Port>(_input_port)->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
@ -807,6 +808,7 @@ FaderPort::set_state (const XMLNode& node, int version)
|
|||
if ((child = node.child (X_("Output"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
boost::shared_ptr<ARDOUR::Port>(_output_port)->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -818,6 +818,7 @@ FaderPort8::set_state (const XMLNode& node, int version)
|
|||
if ((child = node.child (X_("Input"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
DEBUG_TRACE (DEBUG::FaderPort8, "FaderPort8::set_state Input\n");
|
||||
boost::shared_ptr<ARDOUR::Port>(_input_port)->set_state (*portnode, version);
|
||||
}
|
||||
|
@ -826,6 +827,7 @@ FaderPort8::set_state (const XMLNode& node, int version)
|
|||
if ((child = node.child (X_("Output"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
DEBUG_TRACE (DEBUG::FaderPort8, "FaderPort8::set_state Output\n");
|
||||
boost::shared_ptr<ARDOUR::Port>(_output_port)->set_state (*portnode, version);
|
||||
}
|
||||
|
|
|
@ -663,6 +663,7 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
|
|||
if ((child = node.child (X_("Input"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
boost::shared_ptr<ARDOUR::Port>(_input_port)->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
@ -670,6 +671,7 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
|
|||
if ((child = node.child (X_("Output"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
boost::shared_ptr<ARDOUR::Port>(_output_port)->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -799,6 +799,7 @@ LaunchControlXL::set_state (const XMLNode & node, int version)
|
|||
if ((child = node.child (X_("Input"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
_async_in->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
@ -806,6 +807,7 @@ LaunchControlXL::set_state (const XMLNode & node, int version)
|
|||
if ((child = node.child (X_("Output"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
_async_out->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,6 +147,7 @@ SurfacePort::set_state (const XMLNode& node, int version)
|
|||
if ((child = node.child (X_("Input"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
_async_in->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
@ -154,6 +155,7 @@ SurfacePort::set_state (const XMLNode& node, int version)
|
|||
if ((child = node.child (X_("Output"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
_async_out->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1011,6 +1011,7 @@ Push2::set_state (const XMLNode & node, int version)
|
|||
if ((child = node.child (X_("Input"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
_async_in->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
@ -1018,6 +1019,7 @@ Push2::set_state (const XMLNode & node, int version)
|
|||
if ((child = node.child (X_("Output"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
_async_out->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ SurfacePort::set_state (const XMLNode& node, int version)
|
|||
if ((child = node.child (X_("Input"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
_async_in->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
@ -118,6 +119,7 @@ SurfacePort::set_state (const XMLNode& node, int version)
|
|||
if ((child = node.child (X_("Output"))) != 0) {
|
||||
XMLNode* portnode = child->child (Port::state_node_name.c_str());
|
||||
if (portnode) {
|
||||
portnode->remove_property ("name");
|
||||
_async_out->set_state (*portnode, version);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user