diff -r e44baadd4958 -r 72cc3873306a xml.cpp --- a/xml.cpp Thu Sep 01 15:35:18 2005 +0000 +++ b/xml.cpp Mon Sep 05 11:56:31 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")