fix reload of Generic MIDI binding state when the target state involves just a binding map, with no specific controller bindings at all (should fix #5210)
This commit is contained in:
parent
eb40660038
commit
6e485c0fc1
|
@ -528,25 +528,21 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
|
|||
pending_controllables.clear ();
|
||||
}
|
||||
|
||||
/* Load up specific bindings from the
|
||||
* <Controls><MidiControllable>...</MidiControllable><Controls> section
|
||||
*/
|
||||
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lm2 (controllables_lock);
|
||||
controllables.clear ();
|
||||
nlist = node.children(); // "Controls"
|
||||
|
||||
if (nlist.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!nlist.empty()) {
|
||||
nlist = nlist.front()->children(); // "MIDIControllable" ...
|
||||
|
||||
if (nlist.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!nlist.empty()) {
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
|
||||
|
||||
|
||||
if ((prop = (*niter)->property ("id")) != 0) {
|
||||
|
||||
ID id = prop->value ();
|
||||
|
@ -567,6 +563,8 @@ 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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user