Skip to content

Commit

Permalink
Fix snap to grid with differing layer CRS
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 26, 2018
1 parent 1e81e03 commit 6c467fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsmapmouseevent.cpp
Expand Up @@ -80,8 +80,8 @@ void QgsMapMouseEvent::snapToGrid( double precision, const QgsCoordinateReferenc

QgsPointXY pt = ct.transform( mMapPoint );

pt.setX( std::round( mMapPoint.x() / precision ) * precision );
pt.setY( std::round( mMapPoint.y() / precision ) * precision );
pt.setX( std::round( pt.x() / precision ) * precision );
pt.setY( std::round( pt.y() / precision ) * precision );

pt = ct.transform( pt, QgsCoordinateTransform::ReverseTransform );

Expand Down

0 comments on commit 6c467fb

Please sign in to comment.