File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -142,10 +142,12 @@ bool QgsMapLayer::readXML( QDomNode & layer_node )
142
142
QDomElement mne = mnl.toElement ();
143
143
mDataSource = mne.text ();
144
144
145
- // Set a SRS (any will do) so that we don't ask the user.
146
- // We will overwrite whatever GDAL etc picks up anway
145
+ // Set the SRS so that we don't ask the user.
146
+ // Make it the saved SRS to have WMS layer projected correctly.
147
+ // We will still overwrite whatever GDAL etc picks up anyway
147
148
// further down this function.
148
- mSRS ->createFromSrsId (GEOSRS_ID);
149
+ QDomNode srsNode = layer_node.namedItem (" srs" );
150
+ mSRS ->readXML (srsNode);
149
151
150
152
// now let the children grab what they need from the DOM node.
151
153
if (!readXML_ ( layer_node ))
@@ -186,8 +188,8 @@ bool QgsMapLayer::readXML( QDomNode & layer_node )
186
188
mne = mnl.toElement ();
187
189
setLayerName ( mne.text () );
188
190
189
- // read srs
190
- QDomNode srsNode = layer_node. namedItem ( " srs " );
191
+ // overwrite srs
192
+ // FIXME: is this necessary?
191
193
mSRS ->readXML (srsNode);
192
194
193
195
// read transparency level
You can’t perform that action at this time.
0 commit comments