Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use qgsDoubleNear to avoid precision errors
  • Loading branch information
luipir committed Feb 1, 2019
1 parent 738ec79 commit d61940c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterrenderer.cpp
Expand Up @@ -163,7 +163,7 @@ void QgsRasterRenderer::toSld( QDomDocument &doc, QDomElement &element, const Qg
element.appendChild( rasterSymolizerElem );

// add opacity only is different from default
if ( opacity() != 1.0 )
if ( !qgsDoubleNear( opacity(), 1.0 ) )
{
QDomElement opacityElem = doc.createElement( QStringLiteral( "sld:Opacity" ) );
opacityElem.appendChild( doc.createTextNode( QString::number( opacity() ) ) );
Expand Down

0 comments on commit d61940c

Please sign in to comment.