Skip to content

Commit

Permalink
Handle negative rotation values in composer map grid
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15116 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Feb 1, 2011
1 parent e6d7e9d commit b0fb481
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/composer/qgscomposermap.cpp
Expand Up @@ -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'

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b0fb481

Please sign in to comment.