From 9336bddee2b40e3e70699eec897ca100074db87a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 28 Jun 2018 19:03:59 -0400 Subject: [PATCH] call IO::prepare_for_reset() on BOTH IO nodes of a PortInsert's XML state, not just one of them. Allows drag-n-drop of port inserts to work --- libs/ardour/io_processor.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/ardour/io_processor.cc b/libs/ardour/io_processor.cc index 9a162e3f8b..e87b5a5912 100644 --- a/libs/ardour/io_processor.cc +++ b/libs/ardour/io_processor.cc @@ -287,9 +287,12 @@ IOProcessor::prepare_for_reset (XMLNode &state, const std::string& name) state.set_property ("ignore-bitslot", true); state.set_property ("ignore-name", true); - XMLNode* io_node = state.child (IO::state_node_name.c_str()); + XMLNodeList nlist = state.children(); + XMLNodeIterator niter; - if (io_node) { - IO::prepare_for_reset (*io_node, name); + for (niter = nlist.begin(); niter != nlist.end(); ++niter) { + if ((*niter)->name() == IO::state_node_name.c_str()) { + IO::prepare_for_reset (**niter, name); + } } }