xml.cpp
changeset 398 d42881c25fb6
parent 395 7ced3733ba60
child 404 53efc2562a7d
     1.1 --- a/xml.cpp	Mon Oct 30 12:39:37 2006 +0000
     1.2 +++ b/xml.cpp	Thu Nov 16 10:07:11 2006 +0000
     1.3 @@ -74,7 +74,8 @@
     1.4  				mc->setVersion(atts.value( "version" ));
     1.5  
     1.6  		}
     1.7 -		if (loadMode==NewMap)
     1.8 +		if (loadMode==NewMap || 
     1.9 +			(loadMode==ImportReplace && me->getSelection()==mc))
    1.10  		{
    1.11  			if (!atts.value( "author").isEmpty() )
    1.12  			{
    1.13 @@ -92,37 +93,27 @@
    1.14  			if (!atts.value( "linkColorHint").isEmpty() ) 
    1.15  			{
    1.16  				if (atts.value("linkColorHint")=="HeadingColor")
    1.17 -					me->setLinkColorHint(HeadingColor);
    1.18 +					me->setMapLinkColorHint(HeadingColor);
    1.19  				else
    1.20 -					me->setLinkColorHint(DefaultColor);
    1.21 +					me->setMapLinkColorHint(DefaultColor);
    1.22  			}
    1.23  			if (!atts.value( "linkStyle").isEmpty() ) 
    1.24  			{
    1.25 -				QString s=atts.value("linkStyle");
    1.26 -				if (s=="StyleLine")
    1.27 -					me->setLinkStyle(StyleLine);
    1.28 -				else	
    1.29 -					if (s=="StyleParabel")
    1.30 -						me->setLinkStyle(StyleParabel);
    1.31 -					else	
    1.32 -						if (s=="StylePolyLine")
    1.33 -							me->setLinkStyle(StylePolyLine);
    1.34 -						else	
    1.35 -							me->setLinkStyle(StylePolyParabel);
    1.36 +				me->setMapLinkStyle(atts.value("linkStyle"));
    1.37  			}	
    1.38  			if (!atts.value( "linkColor").isEmpty() ) 
    1.39  			{
    1.40  				col.setNamedColor(atts.value("linkColor"));
    1.41 -				me->setLinkColor(col);
    1.42 +				me->setMapDefLinkColor(col);
    1.43  			}	
    1.44  			if (!atts.value( "defXLinkColor").isEmpty() ) 
    1.45  			{
    1.46  				col.setNamedColor(atts.value("defXLinkColor"));
    1.47 -				me->setDefXLinkColor(col);
    1.48 +				me->setMapDefXLinkColor(col);
    1.49  			}	
    1.50  			if (!atts.value( "defXLinkWidth").isEmpty() ) 
    1.51  			{
    1.52 -				me->setDefXLinkWidth(atts.value("defXLinkWidth").toInt ());
    1.53 +				me->setMapDefXLinkWidth(atts.value("defXLinkWidth").toInt ());
    1.54  			}	
    1.55  		}	
    1.56  	} else if ( eName == "select" && state == StateMap )