From 397729eb182ba3d5e311f0ac80959cf72f5cba24 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 6 Jan 2013 14:39:27 +0000 Subject: 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 --- libs/ardour/control_protocol_manager.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'libs/ardour/control_protocol_manager.cc') diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index 64876b1d5f..0fd5319e40 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -72,6 +72,7 @@ ControlProtocolManager::set_session (Session* s) for (list::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) { -- cgit v1.2.3