diff -r 2974ab561436 -r 4fdcbccbc1da xml.cpp --- a/xml.cpp Wed May 02 15:31:18 2007 +0000 +++ b/xml.cpp Mon Jul 09 10:23:39 2007 +0000 @@ -479,6 +479,8 @@ return false; // Couldn't read absPos } } + if (!a.value( "id").isEmpty() ) + lastOO->setID (a.value ("id")); if (!a.value( "url").isEmpty() ) lastOO->setURL (a.value ("url")); if (!a.value( "vymLink").isEmpty() ) @@ -614,6 +616,7 @@ xlo->setWidth(a.value ("width").toInt (&okx, 10)); } + // Connecting by select string for compatibility with version < 1.8.76 if (!a.value( "beginBranch").isEmpty() ) { if (!a.value( "endBranch").isEmpty() ) @@ -632,6 +635,26 @@ success=true; // Not all branches there yet, no error } } + + // object ID is used starting in version 1.8.76 + if (!a.value( "beginID").isEmpty() ) + { + if (!a.value( "endID").isEmpty() ) + { + LinkableMapObj *lmo=mc->findID (a.value( "beginBranch")); + if (lmo && typeid (*lmo)==typeid (BranchObj)) + { + xlo->setBegin ((BranchObj*)lmo); + lmo=mc->findID (a.value( "endID")); + if (lmo && typeid (*lmo)==typeid (BranchObj)) + { + xlo->setEnd ((BranchObj*)(lmo)); + xlo->activate(); + } + } + success=true; // Not all branches there yet, no error + } + } if (!success) delete (xlo); return success; }