diff -r edb78a44240b -r 9ff332964015 xml-vym.cpp --- a/xml-vym.cpp Tue Mar 31 15:36:10 2009 +0000 +++ b/xml-vym.cpp Wed Apr 01 15:06:57 2009 +0000 @@ -6,13 +6,13 @@ #include #include +#include "branchitem.h" #include "misc.h" #include "settings.h" #include "linkablemapobj.h" #include "mainwindow.h" #include "version.h" -static BranchObj *lastBranch; static FloatObj *lastFloat; static OrnamentedObj *lastOO; @@ -55,14 +55,15 @@ // Create mapCenter model->clear(); lastBranch=NULL; + lastBranchItem=NULL; if (!atts.value( "author").isEmpty() ) model->setAuthor(atts.value( "author" ) ); if (!atts.value( "comment").isEmpty() ) model->setComment (atts.value( "comment" ) ); - if (!atts.value( "countBranches").isEmpty() ) + if (!atts.value( "branchCount").isEmpty() ) { - branchesTotal=atts.value("countBranches").toInt(); + branchesTotal=atts.value("branchCount").toInt(); if (branchesTotal>10) { mainWindow->setProgressMinimum (0); @@ -356,10 +357,12 @@ branchesCurrent++; mainWindow->setProgressValue (branchesCurrent); lastOO=lastBranch; + lastBranchItem=(BranchItem*)(lastBranch->getTreeItem()); + if (!readOOAttr(a)) return false; if (!a.value( "scrolled").isEmpty() ) - lastBranch->toggleScroll(); + lastBranchItem->toggleScroll(); if (!a.value( "frameType").isEmpty() ) lastOO->setFrameType (a.value("frameType")); //Compatibility 1.8.1