Skip to content

Commit

Permalink
fix for misprojected wms layers after project load
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@7350 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 7, 2007
1 parent 973592a commit bc72f77
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/core/qgsmaplayer.cpp
Expand Up @@ -142,10 +142,12 @@ bool QgsMapLayer::readXML( QDomNode & layer_node )
QDomElement mne = mnl.toElement();
mDataSource = mne.text();

// Set a SRS (any will do) so that we don't ask the user.
// We will overwrite whatever GDAL etc picks up anway
// Set the SRS so that we don't ask the user.
// Make it the saved SRS to have WMS layer projected correctly.
// We will still overwrite whatever GDAL etc picks up anyway
// further down this function.
mSRS->createFromSrsId(GEOSRS_ID);
QDomNode srsNode = layer_node.namedItem("srs");
mSRS->readXML(srsNode);

// now let the children grab what they need from the DOM node.
if (!readXML_( layer_node ))
Expand Down Expand Up @@ -186,8 +188,8 @@ bool QgsMapLayer::readXML( QDomNode & layer_node )
mne = mnl.toElement();
setLayerName( mne.text() );

//read srs
QDomNode srsNode = layer_node.namedItem("srs");
// overwrite srs
// FIXME: is this necessary?
mSRS->readXML(srsNode);

//read transparency level
Expand Down

0 comments on commit bc72f77

Please sign in to comment.