diff -r 4083860dd82e -r 2cf3413b6ac9 xml.cpp --- a/xml.cpp Tue Jun 14 09:41:37 2005 +0000 +++ b/xml.cpp Tue Sep 06 15:04:50 2005 +0000 @@ -13,6 +13,7 @@ static BranchObj *lastBranch; static FloatObj *lastFloat; +static LinkableMapObj *lastLMO; extern Settings settings; @@ -139,7 +140,7 @@ if (lmo && (typeid(*lmo) == typeid(BranchObj) ) || (typeid(*lmo) == typeid(MapCenterObj) ) ) { - lastBranch=(BranchObj*)(lmo); + lastBranch=(BranchObj*)lmo; if (loadMode==ImportAdd) { lastBranch->addBranch(); @@ -197,6 +198,7 @@ { lastBranch->addBranch(); lastBranch=lastBranch->getLastBranch(); + } else lastBranch->clear(); } else @@ -398,6 +400,9 @@ bool mapBuilderHandler::readBranchAttr (const QXmlAttributes& a) { + lastLMO=lastBranch; + if (!readLinkAttr(a)) return false; + bool okx,oky; int x,y; if (!a.value( "absPosX").isEmpty() && loadMode==NewMap && branchDepth<2) @@ -423,6 +428,16 @@ return true; } +bool mapBuilderHandler::readLinkAttr (const QXmlAttributes& a) +{ + if (!a.value( "hideLinkUnselected").isEmpty()) + { + if (a.value ("hideLinkUnselected") =="true") + if (lastLMO) lastLMO->setHideLinkUnselected(true); + } + return true; +} + bool mapBuilderHandler::readNoteAttr (const QXmlAttributes& a) { // only for backward compatibility (<1.4.6). Use htmlnote now. no.clear(); @@ -471,6 +486,9 @@ bool mapBuilderHandler::readFloatImageAttr (const QXmlAttributes& a) { + lastLMO=lastFloat; + if (!readLinkAttr(a)) return false; + if (!a.value( "useOrientation").isEmpty() ) { if (a.value ("useOrientation") =="true")