Skip to content
Permalink
Browse files

Handle negative rotation values in composer map grid

git-svn-id: http://svn.osgeo.org/qgis/trunk@15116 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Feb 1, 2011
1 parent 0608fc9 commit 37007459b0916e11ce4296a0a51ea2fa46ebedc4
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/composer/qgscomposermap.cpp
@@ -1108,7 +1108,7 @@ int QgsComposerMap::xGridLines( QList< QPair< double, QLineF > >& lines ) const
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 @@ int QgsComposerMap::yGridLines( QList< QPair< double, QLineF > >& lines ) const
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;

0 comments on commit 3700745

Please sign in to comment.
You can’t perform that action at this time.