mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 12:45:45 +01:00
redesign how XML state, bitslots and names get propagated during copying a send/port insert/return
git-svn-id: svn://localhost/ardour2/branches/3.0@11669 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
b557061ec4
commit
d46acb86ea
9 changed files with 163 additions and 100 deletions
|
|
@ -141,15 +141,15 @@ Processor::set_state_2X (const XMLNode & node, int /*version*/)
|
|||
XMLProperty const * prop;
|
||||
|
||||
XMLNodeList children = node.children ();
|
||||
|
||||
|
||||
for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
|
||||
|
||||
if ((*i)->name() == X_("IO")) {
|
||||
|
||||
|
||||
if ((prop = (*i)->property ("name")) != 0) {
|
||||
set_name (prop->value ());
|
||||
}
|
||||
|
||||
|
||||
set_id (**i);
|
||||
|
||||
if ((prop = (*i)->property ("active")) != 0) {
|
||||
|
|
@ -177,17 +177,20 @@ Processor::set_state (const XMLNode& node, int version)
|
|||
|
||||
const XMLProperty *prop;
|
||||
const XMLProperty *legacy_active = 0;
|
||||
bool leave_name_alone = (node.property ("ignore-name") != 0);
|
||||
|
||||
// may not exist for legacy 3.0 sessions
|
||||
if ((prop = node.property ("name")) != 0) {
|
||||
/* don't let derived classes have a crack at set_name,
|
||||
as some (like Send) will screw with the one we suggest.
|
||||
*/
|
||||
Processor::set_name (prop->value());
|
||||
if (!leave_name_alone) {
|
||||
// may not exist for legacy 3.0 sessions
|
||||
if ((prop = node.property ("name")) != 0) {
|
||||
/* don't let derived classes have a crack at set_name,
|
||||
as some (like Send) will screw with the one we suggest.
|
||||
*/
|
||||
Processor::set_name (prop->value());
|
||||
}
|
||||
|
||||
set_id (node);
|
||||
}
|
||||
|
||||
set_id (node);
|
||||
|
||||
XMLNodeList nlist = node.children();
|
||||
XMLNodeIterator niter;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue