Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
ending store and restore layer extents in projects
- Loading branch information
Showing
with
11 additions
and
0 deletions.
-
+11
−0
src/core/qgsmaplayer.cpp
|
@@ -426,6 +426,12 @@ bool QgsMapLayer::readLayerXML( const QDomElement& layerElement ) |
|
|
setMinimumScale( layerElement.attribute( "minimumScale" ).toFloat() ); |
|
|
setMaximumScale( layerElement.attribute( "maximumScale" ).toFloat() ); |
|
|
|
|
|
QDomNode extentNode = layerElement.namedItem( "extent" ); |
|
|
if ( !extentNode.isNull() ) |
|
|
{ |
|
|
setExtent( QgsXmlUtils::readRectangle( extentNode.toElement() ) ); |
|
|
} |
|
|
|
|
|
// set name |
|
|
mnl = layerElement.namedItem( "layername" ); |
|
|
mne = mnl.toElement(); |
|
@@ -1257,6 +1263,11 @@ void QgsMapLayer::exportNamedStyle( QDomDocument &doc, QString &errorMsg ) |
|
|
myRootNode.setAttribute( "minimumScale", QString::number( minimumScale() ) ); |
|
|
myRootNode.setAttribute( "maximumScale", QString::number( maximumScale() ) ); |
|
|
|
|
|
if ( !mExtent.isNull() ) |
|
|
{ |
|
|
myRootNode.appendChild( QgsXmlUtils::writeRectangle( mExtent, myDocument ) ); |
|
|
} |
|
|
|
|
|
#if 0 |
|
|
// <transparencyLevelInt> |
|
|
QDomElement transparencyLevelIntElement = myDocument.createElement( "transparencyLevelInt" ); |
|
|