Skip to content
Permalink
Browse files
more precise comments
  • Loading branch information
3nids committed Sep 28, 2018
1 parent 33c68d2 commit 4d9dcd83a16470755fe9429f6ebcc91bb18ff273
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/quickgui/qgsquickmapsettings.cpp
@@ -119,7 +119,8 @@ QPointF QgsQuickMapSettings::coordinateToScreen( const QgsPoint &point ) const
QgsPoint QgsQuickMapSettings::screenToCoordinate( const QPointF &point ) const
{
// use floating point precision with mapToCoordinatesF
// instead of integer precision of toMapCoordinates( point.toPoint() )
// this is to aoviding rounding errors with an odd screen width or height
// and the point being set to the exact center of it
const QgsPointXY pp = mMapSettings.mapToPixel().toMapCoordinatesF( point.x(), point.y() );
return QgsPoint( pp );
}

0 comments on commit 4d9dcd8

Please sign in to comment.