Move learned midi binding reload after midi map load (fixes #6405)
This commit is contained in:
parent
fa3896a483
commit
d8f3f9f02d
@ -534,6 +534,16 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
|
||||
pending_controllables.clear ();
|
||||
}
|
||||
|
||||
// midi map has to be loaded first so learned binding can go on top
|
||||
if ((prop = node.property ("binding")) != 0) {
|
||||
for (list<MapInfo>::iterator x = map_info.begin(); x != map_info.end(); ++x) {
|
||||
if (prop->value() == (*x).name) {
|
||||
load_bindings ((*x).path);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Load up specific bindings from the
|
||||
* <Controls><MidiControllable>...</MidiControllable><Controls> section
|
||||
*/
|
||||
@ -552,6 +562,7 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
|
||||
if ((prop = (*niter)->property ("id")) != 0) {
|
||||
|
||||
ID id = prop->value ();
|
||||
DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("Relearned binding for session: Control ID: %1\n", id));
|
||||
Controllable* c = Controllable::by_id (id);
|
||||
|
||||
if (c) {
|
||||
@ -572,15 +583,6 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
|
||||
}
|
||||
}
|
||||
|
||||
if ((prop = node.property ("binding")) != 0) {
|
||||
for (list<MapInfo>::iterator x = map_info.begin(); x != map_info.end(); ++x) {
|
||||
if (prop->value() == (*x).name) {
|
||||
load_bindings ((*x).path);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user