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@15116 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Feb 1, 2011
1 parent 0608fc9 commit 3700745
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/composer/qgscomposermap.cpp
Original file line number Diff line number Diff line change
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 3700745

Please sign in to comment.