mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
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
This commit is contained in:
parent
a401abfee7
commit
397729eb18
2 changed files with 10 additions and 7 deletions
|
|
@ -72,6 +72,7 @@ ControlProtocolManager::set_session (Session* s)
|
|||
|
||||
for (list<ControlProtocolInfo*>::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) {
|
||||
if ((*i)->requested || (*i)->mandatory) {
|
||||
|
||||
instantiate (**i);
|
||||
(*i)->requested = false;
|
||||
|
||||
|
|
@ -344,12 +345,7 @@ ControlProtocolManager::set_state (const XMLNode& node, int /*version*/)
|
|||
ControlProtocolInfo* cpi = cpi_by_name (prop->value());
|
||||
|
||||
if (cpi) {
|
||||
|
||||
if (!(*citer)->children().empty()) {
|
||||
cpi->state = new XMLNode (*((*citer)->children().front ()));
|
||||
} else {
|
||||
cpi->state = 0;
|
||||
}
|
||||
cpi->state = new XMLNode (**citer);
|
||||
|
||||
if (active) {
|
||||
if (_session) {
|
||||
|
|
|
|||
|
|
@ -544,8 +544,16 @@ 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) {
|
||||
|
||||
ID id = prop->value ();
|
||||
|
|
@ -565,7 +573,6 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ((prop = node.property ("binding")) != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue