Skip to content

Commit

Permalink
more precise comments
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored Sep 28, 2018
1 parent 33c68d2 commit 4d9dcd8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/quickgui/qgsquickmapsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down

0 comments on commit 4d9dcd8

Please sign in to comment.