[QGIS Commit] r12516 - trunk/qgis/src/core/composer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Dec 19 08:27:01 EST 2009


Author: mhugent
Date: 2009-12-19 08:27:01 -0500 (Sat, 19 Dec 2009)
New Revision: 12516

Modified:
   trunk/qgis/src/core/composer/qgscomposermap.cpp
Log:
Fix for bug #2117, wrong composer scale if units are degree

Modified: trunk/qgis/src/core/composer/qgscomposermap.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.cpp	2009-12-19 12:17:28 UTC (rev 12515)
+++ trunk/qgis/src/core/composer/qgscomposermap.cpp	2009-12-19 13:27:01 UTC (rev 12516)
@@ -485,12 +485,7 @@
   }
 
   double scaleRatio = scaleDenominator / currentScaleDenominator;
-
-  double newXMax = mExtent.xMinimum() + scaleRatio * ( mExtent.xMaximum() - mExtent.xMinimum() );
-  double newYMax = mExtent.yMinimum() + scaleRatio * ( mExtent.yMaximum() - mExtent.yMinimum() );
-
-  QgsRectangle newExtent( mExtent.xMinimum(), mExtent.yMinimum(), newXMax, newYMax );
-  mExtent = newExtent;
+  mExtent.scale( scaleRatio );
   mCacheUpdated = false;
   emit extentChanged();
   cache();



More information about the QGIS-commit mailing list