diff -r 36d140349897 -r ce2abdbd0b65 xml.cpp --- a/xml.cpp Mon Jun 25 12:54:19 2007 +0000 +++ b/xml.cpp Fri Jun 29 09:43:53 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; }