mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
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
8 changed files with 16 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue