Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix snap to grid with differing layer CRS
- Loading branch information
Showing
with
2 additions
and
2 deletions.
-
+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 ); |
|
|
|
|
|