1.1 --- a/xml.cpp Wed May 02 15:31:18 2007 +0000
1.2 +++ b/xml.cpp Mon Jul 23 12:42:01 2007 +0000
1.3 @@ -479,6 +479,8 @@
1.4 return false; // Couldn't read absPos
1.5 }
1.6 }
1.7 + if (!a.value( "id").isEmpty() )
1.8 + lastOO->setID (a.value ("id"));
1.9 if (!a.value( "url").isEmpty() )
1.10 lastOO->setURL (a.value ("url"));
1.11 if (!a.value( "vymLink").isEmpty() )
1.12 @@ -614,6 +616,7 @@
1.13 xlo->setWidth(a.value ("width").toInt (&okx, 10));
1.14 }
1.15
1.16 + // Connecting by select string for compatibility with version < 1.8.76
1.17 if (!a.value( "beginBranch").isEmpty() )
1.18 {
1.19 if (!a.value( "endBranch").isEmpty() )
1.20 @@ -632,6 +635,26 @@
1.21 success=true; // Not all branches there yet, no error
1.22 }
1.23 }
1.24 +
1.25 + // object ID is used starting in version 1.8.76
1.26 + if (!a.value( "beginID").isEmpty() )
1.27 + {
1.28 + if (!a.value( "endID").isEmpty() )
1.29 + {
1.30 + LinkableMapObj *lmo=mc->findID (a.value( "beginBranch"));
1.31 + if (lmo && typeid (*lmo)==typeid (BranchObj))
1.32 + {
1.33 + xlo->setBegin ((BranchObj*)lmo);
1.34 + lmo=mc->findID (a.value( "endID"));
1.35 + if (lmo && typeid (*lmo)==typeid (BranchObj))
1.36 + {
1.37 + xlo->setEnd ((BranchObj*)(lmo));
1.38 + xlo->activate();
1.39 + }
1.40 + }
1.41 + success=true; // Not all branches there yet, no error
1.42 + }
1.43 + }
1.44 if (!success) delete (xlo);
1.45 return success;
1.46 }