Skip to content

Commit

Permalink
Merge pull request #7885 from m-kuhn/subUnitRes
Browse files Browse the repository at this point in the history
Snap to grid to sub unit resolution
  • Loading branch information
m-kuhn committed Sep 13, 2018
2 parents e22939e + aa95881 commit 23f1e43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgssnaptogridcanvasitem.cpp
Expand Up @@ -53,9 +53,9 @@ void QgsSnapToGridCanvasItem::paint( QPainter *painter )
const double gridYMin = std::ceil( layerExtent.yMinimum() / mPrecision ) * mPrecision;
const double gridYMax = std::ceil( layerExtent.yMaximum() / mPrecision ) * mPrecision;

for ( int x = gridXMin ; x < gridXMax; x += mPrecision )
for ( double x = gridXMin ; x < gridXMax; x += mPrecision )
{
for ( int y = gridYMin ; y < gridYMax; y += mPrecision )
for ( double y = gridYMin ; y < gridYMax; y += mPrecision )
{
const QgsPointXY pt = mTransform.transform( x, y );
const QPointF canvasPt = toCanvasCoordinates( pt );
Expand Down

0 comments on commit 23f1e43

Please sign in to comment.