Skip to content
Permalink
Browse files

Fix snap to grid with differing layer CRS

  • Loading branch information
m-kuhn committed Aug 25, 2018
1 parent 1e81e03 commit 6c467fb0327e14f59796758098b7fce31eb046b4
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/gui/qgsmapmouseevent.cpp
@@ -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 );

0 comments on commit 6c467fb

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