Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Read the geographic extent only when the trust option is activated
- Loading branch information
Showing
with
5 additions
and
7 deletions.
-
+5
−7
src/core/qgsmaplayer.cpp
|
@@ -392,15 +392,13 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCon |
|
|
setRefreshOnNofifyMessage( layerElement.attribute( QStringLiteral( "refreshOnNotifyMessage" ), QString() ) ); |
|
|
setRefreshOnNotifyEnabled( layerElement.attribute( QStringLiteral( "refreshOnNotifyEnabled" ), QStringLiteral( "0" ) ).toInt() ); |
|
|
|
|
|
// geographic extent |
|
|
// if ( mReadExtentFromXml ) |
|
|
// { |
|
|
QDomNode geoExtentNode = layerElement.namedItem( QStringLiteral( "geographicExtent" ) ); |
|
|
if ( !geoExtentNode.isNull() ) |
|
|
// geographic extent is read only if necessary |
|
|
if ( mReadFlags & QgsMapLayer::ReadFlag::FlagTrustLayerMetadata ) |
|
|
{ |
|
|
mGeographicExtent = QgsXmlUtils::readRectangle( geoExtentNode.toElement() ); |
|
|
const QDomNode geoExtentNode = layerElement.namedItem( QStringLiteral( "geographicExtent" ) ); |
|
|
if ( !geoExtentNode.isNull() ) |
|
|
mGeographicExtent = QgsXmlUtils::readRectangle( geoExtentNode.toElement() ); |
|
|
} |
|
|
// } |
|
|
|
|
|
return ! layerError; |
|
|
} // bool QgsMapLayer::readLayerXML |
|
|