Skip to content
Permalink
Browse files

use qgsDoubleNear to avoid precision errors

  • Loading branch information
luipir committed Feb 12, 2019
1 parent 8f75b15 commit 6af1d3fe4baaab604ad8796ff94f9b8130a87435
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/raster/qgsrasterrenderer.cpp
@@ -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() ) ) );

0 comments on commit 6af1d3f

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