diff -r 4244bcd9e6ea -r 325958acb69b xml.cpp --- a/xml.cpp Thu Sep 22 12:56:05 2005 +0000 +++ b/xml.cpp Mon Oct 10 11:20:25 2005 +0000 @@ -176,11 +176,10 @@ lastBranch->addFloatImage(); lastFloat=lastBranch->getLastFloatImage(); if (!readFloatImageAttr(atts)) return false; - } else if ( eName == "branch" && state == StateMap) + } else if ( (eName == "branch"||eName=="floatimage") && state == StateMap) { // This is used in vymparts, which have no mapcenter! isVymPart=true; - state=StateBranch; LinkableMapObj* lmo=me->getSelection(); if (!lmo) { @@ -194,17 +193,26 @@ || (typeid(*lmo) == typeid(MapCenterObj) ) ) { lastBranch=(BranchObj*)(lmo); - if (loadMode==ImportAdd) + if (eName=="branch") { - lastBranch->addBranch(); - lastBranch=lastBranch->getLastBranch(); - - } else - lastBranch->clear(); - } else - return false; - branchDepth=1; - readBranchAttr (atts); + state=StateBranch; + if (loadMode==ImportAdd) + { + lastBranch->addBranch(); + lastBranch=lastBranch->getLastBranch(); + + } else + lastBranch->clear(); + branchDepth=1; + readBranchAttr (atts); + } else if (eName=="floatimage") + { + state=StateFloatImage; + lastBranch->addFloatImage(); + lastFloat=lastBranch->getLastFloatImage(); + if (!readFloatImageAttr(atts)) return false; + } else return false; + } else return false; } else if ( eName == "branch" && state == StateMapCenter) { state=StateBranch; @@ -279,6 +287,7 @@ case StateMapCenterHeading: state=StateMapCenter; return true; case StateMapCenterNote: state=StateMapCenter; return true; case StateMapCenterFloatImage: state=StateMapCenter; return true; + case StateFloatImage: state=StateMap; return true; case StateBranch: if (branchDepth>1) {