Skip to content
Permalink
Browse files

Followup c04a540

  • Loading branch information
nyalldawson committed Jul 13, 2014
1 parent c04a540 commit 8be42a0a15da8d856292b24a14ba7d5e5efd4237
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/core/composer/qgscomposermapgrid.cpp
@@ -970,7 +970,8 @@ int QgsComposerMapGrid::xGridLinesCRSTransform( const QgsRectangle& bbox, const
double maxX = bbox.xMaximum();
double step = ( maxX - minX ) / 20;

while ( currentLevel >= bbox.yMinimum() )
int gridLineCount = 0;
while ( currentLevel >= bbox.yMinimum() && gridLineCount < MAX_GRID_LINES )
{
QPolygonF gridLine;
double currentX = minX;
@@ -991,6 +992,7 @@ int QgsComposerMapGrid::xGridLinesCRSTransform( const QgsRectangle& bbox, const
if ( gridLine.size() > 0 )
{
lines.append( qMakePair( currentLevel, gridLine ) );
gridLineCount++;
}
currentLevel -= mGridIntervalY;
}
@@ -1013,7 +1015,8 @@ int QgsComposerMapGrid::yGridLinesCRSTransform( const QgsRectangle& bbox, const
double maxY = bbox.yMaximum();
double step = ( maxY - minY ) / 20;

while ( currentLevel <= bbox.xMaximum() )
int gridLineCount = 0;
while ( currentLevel <= bbox.xMaximum() && gridLineCount < MAX_GRID_LINES )
{
QPolygonF gridLine;
double currentY = minY;
@@ -1035,6 +1038,7 @@ int QgsComposerMapGrid::yGridLinesCRSTransform( const QgsRectangle& bbox, const
if ( gridLine.size() > 0 )
{
lines.append( qMakePair( currentLevel, gridLine ) );
gridLineCount++;
}
currentLevel += mGridIntervalX;
}

0 comments on commit 8be42a0

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