Skip to content
Permalink
Browse files

better use qgsDoubleNear

  • Loading branch information
luipir committed Feb 12, 2019
1 parent 938e8d5 commit 53ec2cfc91db474b1ff2658f86b4fa2e5800b786
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/raster/qgssinglebandgrayrenderer.cpp
@@ -281,7 +281,7 @@ void QgsSingleBandGrayRenderer::toSld( QDomDocument &doc, QDomElement &element,
QgsRasterBandStats myRasterBandStats = mInput->bandStatistics( grayBand(), QgsRasterBandStats::Min | QgsRasterBandStats::Max );

// if minimum range differ from the real minimum => set is in exported SLD vendor option
if ( contrastEnhancement()->minimumValue() != myRasterBandStats.minimumValue )
if ( !qgsDoubleNear( contrastEnhancement()->minimumValue(), myRasterBandStats.minimumValue ) )
{
// look for VendorOption tag to look for that with minValue attribute
QDomNodeList elements = contrastEnhancementElem.elementsByTagName( QStringLiteral( "sld:VendorOption" ) );

0 comments on commit 53ec2cf

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