Skip to content

Commit f00e161

Browse files
author
mhugent
committed
Use a tolerance to decide if a point symbol may be used from cached. Because on some systems, dpi in x- and y-direction are different and so the scaleProduct is not exactly 1
git-svn-id: http://svn.osgeo.org/qgis/trunk@11444 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent fdc629c commit f00e161

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/symbology/qgssymbol.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,10 @@ QImage QgsSymbol::getCachedPointSymbolAsImage( double widthScale, bool selected,
381381
QImage QgsSymbol::getPointSymbolAsImage( double widthScale, bool selected, QColor selectionColor, double scale,
382382
double rotation, double rasterScaleFactor, double opacity )
383383
{
384+
double scaleProduct = scale * rasterScaleFactor;
384385

385-
if ( 1.0 == ( scale * rasterScaleFactor ) && 0 == rotation )
386+
//on systems where dpi in x- and y-direction are not the same, the scaleProduct may differ from 1.0 by a very small number
387+
if ( scaleProduct > 0.9 && scaleProduct < 1.1 && 0 == rotation )
386388
{
387389
if ( mWidthScale < 0 || widthScale == mWidthScale )
388390
{

0 commit comments

Comments
 (0)