xml-vym.cpp
changeset 721 12958f987bcf
parent 716 191a6e396803
child 723 11f9124c1cca
     1.1 --- a/xml-vym.cpp	Wed Jul 16 10:44:44 2008 +0000
     1.2 +++ b/xml-vym.cpp	Wed Jul 16 10:46:14 2008 +0000
     1.3 @@ -105,29 +105,29 @@
     1.4  			if (!atts.value( "selectionColor").isEmpty() )
     1.5  			{
     1.6  				col.setNamedColor(atts.value("selectionColor"));
     1.7 -				model->getMapEditor()->setSelectionColor(col);
     1.8 +				model->setSelectionColor(col);
     1.9  			}	    
    1.10  			if (!atts.value( "linkColorHint").isEmpty() ) 
    1.11  			{
    1.12  				if (atts.value("linkColorHint")=="HeadingColor")
    1.13 -					model->getMapEditor()->setMapLinkColorHint(LinkableMapObj::HeadingColor);
    1.14 +					model->setMapLinkColorHint(LinkableMapObj::HeadingColor);
    1.15  				else
    1.16 -					model->getMapEditor()->setMapLinkColorHint(LinkableMapObj::DefaultColor);
    1.17 +					model->setMapLinkColorHint(LinkableMapObj::DefaultColor);
    1.18  			}
    1.19  			if (!atts.value( "linkStyle").isEmpty() ) 
    1.20 -				model->getMapEditor()->setMapLinkStyle(atts.value("linkStyle"));
    1.21 +				model->setMapLinkStyle(atts.value("linkStyle"));
    1.22  			if (!atts.value( "linkColor").isEmpty() ) 
    1.23  			{
    1.24  				col.setNamedColor(atts.value("linkColor"));
    1.25 -				model->getMapEditor()->setMapDefLinkColor(col);
    1.26 +				model->setMapDefLinkColor(col);
    1.27  			}	
    1.28  			if (!atts.value( "defXLinkColor").isEmpty() ) 
    1.29  			{
    1.30  				col.setNamedColor(atts.value("defXLinkColor"));
    1.31 -				model->getMapEditor()->setMapDefXLinkColor(col);
    1.32 +				model->setMapDefXLinkColor(col);
    1.33  			}	
    1.34  			if (!atts.value( "defXLinkWidth").isEmpty() ) 
    1.35 -				model->getMapEditor()->setMapDefXLinkWidth(atts.value("defXLinkWidth").toInt ());
    1.36 +				model->setMapDefXLinkWidth(atts.value("defXLinkWidth").toInt ());
    1.37  		}	
    1.38  	} else if ( eName == "select" && state == StateMap ) 
    1.39  	{
    1.40 @@ -150,8 +150,8 @@
    1.41  			// Treat the found mapcenter as a branch 
    1.42  			// in an existing map
    1.43  			LinkableMapObj* lmo=model->getSelection();
    1.44 -			if (lmo && ((typeid(*lmo) == typeid(BranchObj) ) 
    1.45 -			        ||  typeid(*lmo) == typeid(MapCenterObj) ) )
    1.46 +			if (lmo && (typeid(*lmo) == typeid(BranchObj) ) 
    1.47 +			        || (typeid(*lmo) == typeid(MapCenterObj) ) )
    1.48  			{
    1.49  				lastBranch=(BranchObj*)lmo;
    1.50  				if (loadMode==ImportAdd)
    1.51 @@ -205,10 +205,10 @@
    1.52  			// selection==lmo==NULL
    1.53  			// Treat it like ImportAdd then...
    1.54  			loadMode=ImportAdd;
    1.55 -			lmo=model->first();		// FIXME this used to be lmo=mc before
    1.56 +			lmo=model->first();		
    1.57  		}	
    1.58 -		if (lmo && ((typeid(*lmo) == typeid(BranchObj) ) 
    1.59 -				||  typeid(*lmo) == typeid(MapCenterObj) ) )
    1.60 +		if (lmo && (typeid(*lmo) == typeid(BranchObj) ) 
    1.61 +				|| (typeid(*lmo) == typeid(MapCenterObj) ) )
    1.62  		{
    1.63  			lastBranch=(BranchObj*)(lmo);
    1.64  			if (eName=="branch")
    1.65 @@ -626,7 +626,7 @@
    1.66  	if (!a.value( "key").isEmpty() ) 
    1.67  	{
    1.68  		if (!a.value( "value").isEmpty() ) 
    1.69 -			settings.setLocalEntry (model->getMapEditor()->getDestPath(), a.value ("key"), a.value ("value"));
    1.70 +			settings.setLocalEntry (model->getDestPath(), a.value ("key"), a.value ("value"));
    1.71  		else
    1.72  			return false;
    1.73