[SCM] qgis branch, master, updated. a2ee769957385f4e084c5e8b6ba178a8c877d1db
Marco Hugentobler
marco.hugentobler at sourcepole.ch
Tue Mar 20 13:43:03 UTC 2012
The following commit has been merged in the master branch:
commit e71494a5607b5c9792415e3652c5b8797d1f5e73
Author: Marco Hugentobler <marco.hugentobler at sourcepole.ch>
Date: Wed Mar 7 14:03:31 2012 +0100
Fix wrong extent after loading project files with embedded groups
diff --git a/src/app/legend/qgslegend.cpp b/src/app/legend/qgslegend.cpp
index 7cf17c9..7d7895f 100644
--- a/src/app/legend/qgslegend.cpp
+++ b/src/app/legend/qgslegend.cpp
@@ -1319,6 +1319,12 @@ bool QgsLegend::writeXML( QList<QTreeWidgetItem *> items, QDomNode &node, QDomDo
bool QgsLegend::readXML( QgsLegendGroup *parent, const QDomNode &node )
{
+ QgsRectangle bkMapExtent;
+ if ( mMapCanvas )
+ {
+ bkMapExtent = mMapCanvas->extent();
+ }
+
const QDomNodeList &l = node.childNodes();
for ( int i = 0; i < l.count(); i++ )
{
@@ -1444,6 +1450,11 @@ bool QgsLegend::readXML( QgsLegendGroup *parent, const QDomNode &node )
}
}
+ //restore canvas extent (could be changed by addLayer calls)
+ if ( !bkMapExtent.isEmpty() )
+ {
+ mMapCanvas->setExtent( bkMapExtent );
+ }
return true;
}
--
The Quantum GIS in Debian project
More information about the Pkg-grass-devel
mailing list