1.1 --- a/xml-vym.cpp Thu Jan 15 00:52:35 2009 +0000
1.2 +++ b/xml-vym.cpp Tue Jan 20 15:23:16 2009 +0000
1.3 @@ -35,13 +35,13 @@
1.4 {
1.5 QColor col;
1.6 /* Testing
1.7 + */
1.8 cout << "startElement <"<< qPrintable(eName)
1.9 <<"> state="<<state
1.10 <<" laststate="<<stateStack.last()
1.11 <<" loadMode="<<loadMode
1.12 - <<" line="<<QXmlDefaultHandler::lineNumber()
1.13 + // <<" line="<<QXmlDefaultHandler::lineNumber()
1.14 <<endl;
1.15 - */
1.16 stateStack.append (state);
1.17 if ( state == StateInit && (eName == "vymmap") )
1.18 {
1.19 @@ -121,12 +121,14 @@
1.20 // Really use the found mapcenter as MCO in a new map
1.21
1.22 model->createMapCenter();
1.23 + cout << "ok0\n";
1.24 lastBranch=model->getSelectedBranch();
1.25 + cout << "ok1 lastBranch="<<lastBranch<<endl;
1.26 } else
1.27 {
1.28 // Treat the found mapcenter as a branch
1.29 // in an existing map
1.30 - LinkableMapObj* lmo=model->getSelection();
1.31 + LinkableMapObj* lmo=model->getSelectedLMO();
1.32 if (lmo && ( (typeid(*lmo) == typeid(BranchObj) )
1.33 || (typeid(*lmo) == typeid(MapCenterObj) ) ) )
1.34 {
1.35 @@ -175,7 +177,7 @@
1.36 {
1.37 // This is used in vymparts, which have no mapcenter!
1.38 isVymPart=true;
1.39 - LinkableMapObj* lmo=model->getSelection();
1.40 + LinkableMapObj* lmo=model->getSelectedLMO();
1.41 if (!lmo)
1.42 {
1.43 // If a vym part is _loaded_ (not imported),