1.1 --- a/xml-vym.cpp Tue Sep 08 12:15:39 2009 +0000
1.2 +++ b/xml-vym.cpp Fri Oct 02 13:24:55 2009 +0000
1.3 @@ -14,8 +14,6 @@
1.4 #include "version.h"
1.5 #include "xlinkitem.h"
1.6
1.7 -static ImageItem *lastImageItem;
1.8 -static MapItem *lastMI;
1.9
1.10 extern Main *mainWindow;
1.11 extern Settings settings;
1.12 @@ -145,7 +143,8 @@
1.13 {
1.14 // Treat the found mapcenter as a branch
1.15 // in an existing map
1.16 - BranchItem *bi=model->getSelectedBranch(); //FIXME-2 selection is no longer used here...
1.17 + BranchItem *bi=model->getSelectedBranch();
1.18 + cout << "xml-vym bi="<<bi->getHeadingStd()<<" loadMode="<<loadMode<<endl;
1.19 if (bi)
1.20 {
1.21 lastBranch=bi;
1.22 @@ -153,7 +152,7 @@
1.23 {
1.24 lastBranch=model->createBranch(lastBranch);
1.25 } //else
1.26 - //lastBranch->clear(); //FIXME-2 clear not really defined!
1.27 + model->clearItem(lastBranch);
1.28 } else
1.29 // add mapCenter without parent
1.30 lastBranch=model->createMapCenter();
1.31 @@ -190,9 +189,9 @@
1.32 if (!readImageAttr(atts)) return false;
1.33 } else if ( (eName == "branch"||eName=="floatimage") && state == StateMap)
1.34 {
1.35 - // This is used in vymparts, which have no mapcenter!
1.36 + // This is used in vymparts, which have no mapcenter or for undo
1.37 isVymPart=true;
1.38 - TreeItem *ti=model->getSelectedItem(); //FIXME-3 selection is no longer used here...
1.39 + TreeItem *ti=model->getSelectedItem();
1.40 if (!ti)
1.41 {
1.42 // If a vym part is _loaded_ (not imported),
1.43 @@ -202,6 +201,7 @@
1.44 // FIXME-3 lmo=model->first()->getLMO();
1.45 // Do we really have no MCO when loading?????
1.46 cout << "xml-vym aborted\n";
1.47 + return false;
1.48 }
1.49 if (ti && ti->isBranchLikeType() )
1.50 {
1.51 @@ -212,9 +212,8 @@
1.52 if (loadMode==ImportAdd)
1.53 {
1.54 lastBranch=model->createBranch(lastBranch);
1.55 -
1.56 } else
1.57 - //FIXME-2 lastBranch->clear();
1.58 + model->clearItem (lastBranch);
1.59 readBranchAttr (atts);
1.60 } else if (eName=="floatimage")
1.61 {