diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-06 14:39:27 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-06 14:39:27 +0000 |
commit | 397729eb182ba3d5e311f0ac80959cf72f5cba24 (patch) | |
tree | 319e5d7d755fa23b8672667b717c6c65416888ab /libs/surfaces | |
parent | a401abfee715529d2379f7d0fef5068bddc06640 (diff) |
fix continuing SNAFUs with ::set_state() for control protocols and the parent/child/grandchild relationship for the XML nodes. this corrects problems with MackieControl
git-svn-id: svn://localhost/ardour2/branches/3.0@13794 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/generic_midi/generic_midi_control_protocol.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc index 8173217c22..a8ca0c7221 100644 --- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc +++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc @@ -544,7 +544,15 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version) return 0; } + nlist = nlist.front()->children(); // "MIDIControllable" ... + + if (nlist.empty()) { + return 0; + } + for (niter = nlist.begin(); niter != nlist.end(); ++niter) { + + if ((prop = (*niter)->property ("id")) != 0) { @@ -565,7 +573,6 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version) } } } - } if ((prop = node.property ("binding")) != 0) { |