xml.cpp
changeset 86 0ed77eb5d1cd
parent 0 7a96bd401351
child 95 f688a9913724
     1.1 --- a/xml.cpp	Sun Jan 30 12:58:47 2005 +0000
     1.2 +++ b/xml.cpp	Sun Jan 30 23:28:08 2005 +0000
     1.3 @@ -47,7 +47,7 @@
     1.4                      const QString& eName, const QXmlAttributes& atts ) 
     1.5  {
     1.6      QColor col;
     1.7 -//	cout << "startElement <"<<eName<<">  state="<<state <<"  laststate="<<laststate<<endl;
     1.8 +	//cout << "startElement <"<<eName<<">  state="<<state <<"  laststate="<<laststate<<"   loadMode="<<loadMode<<endl;
     1.9      if ( state == StateInit && (eName == "vymmap")  ) 
    1.10  	{
    1.11          state = StateMap;
    1.12 @@ -171,6 +171,14 @@
    1.13  		isVymPart=true;
    1.14  		state=StateBranch;
    1.15  		LinkableMapObj* lmo=me->getSelection();
    1.16 +		if (!lmo)
    1.17 +		{
    1.18 +			// If a vym part is _loaded_ (not imported), 
    1.19 +			// selection==lmo==NULL
    1.20 +			// Treat it like ImportAdd then...
    1.21 +			loadMode=ImportAdd;
    1.22 +			lmo=mc;
    1.23 +		}	
    1.24  		if (lmo && (typeid(*lmo) == typeid(BranchObj) ) 
    1.25  				|| (typeid(*lmo) == typeid(MapCenterObj) ) )
    1.26  		{