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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Feb 1 11:53:25 EST 2011


Author: mhugent
Date: 2011-02-01 08:53:25 -0800 (Tue, 01 Feb 2011)
New Revision: 15116

Modified:
   trunk/qgis/src/core/composer/qgscomposermap.cpp
Log:
Handle negative rotation values in composer map grid

Modified: trunk/qgis/src/core/composer/qgscomposermap.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.cpp	2011-02-01 16:34:58 UTC (rev 15115)
+++ trunk/qgis/src/core/composer/qgscomposermap.cpp	2011-02-01 16:53:25 UTC (rev 15116)
@@ -1108,7 +1108,7 @@
   double roundCorrection = mapBoundingRect.top() > 0 ? 1.0 : 0.0;
   double currentLevel = ( int )(( mapBoundingRect.top() - mGridOffsetY ) / mGridIntervalY + roundCorrection ) * mGridIntervalY + mGridOffsetY;
 
-  if ( mRotation <= 0.0 )
+  if ( doubleNear( mRotation, 0.0 ) )
   {
     //no rotation. Do it 'the easy way'
 
@@ -1176,7 +1176,7 @@
   double roundCorrection = mapBoundingRect.left() > 0 ? 1.0 : 0.0;
   double currentLevel = ( int )(( mapBoundingRect.left() - mGridOffsetX ) / mGridIntervalX + roundCorrection ) * mGridIntervalX + mGridOffsetX;
 
-  if ( mRotation <= 0.0 )
+  if ( doubleNear( mRotation, 0.0 ) )
   {
     //no rotation. Do it 'the easy way'
     double xCanvasCoord;



More information about the QGIS-commit mailing list