Skip to content

Commit 23f1e43

Browse files
authored
Merge pull request #7885 from m-kuhn/subUnitRes
Snap to grid to sub unit resolution
2 parents e22939e + aa95881 commit 23f1e43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gui/qgssnaptogridcanvasitem.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ void QgsSnapToGridCanvasItem::paint( QPainter *painter )
5353
const double gridYMin = std::ceil( layerExtent.yMinimum() / mPrecision ) * mPrecision;
5454
const double gridYMax = std::ceil( layerExtent.yMaximum() / mPrecision ) * mPrecision;
5555

56-
for ( int x = gridXMin ; x < gridXMax; x += mPrecision )
56+
for ( double x = gridXMin ; x < gridXMax; x += mPrecision )
5757
{
58-
for ( int y = gridYMin ; y < gridYMax; y += mPrecision )
58+
for ( double y = gridYMin ; y < gridYMax; y += mPrecision )
5959
{
6060
const QgsPointXY pt = mTransform.transform( x, y );
6161
const QPointF canvasPt = toCanvasCoordinates( pt );

0 commit comments

Comments
 (0)