Skip to content
Permalink
Browse files
Clone gradient in singleband gray renderer. Combine new opacity with …
…existing one in mapserver
  • Loading branch information
mhugent committed Jan 22, 2013
1 parent 2fbe172 commit 6dcb5f4f4d26d32e33c023f650c0fcca24d4fdd0
Showing with 2 additions and 1 deletion.
  1. +1 −0 src/core/raster/qgssinglebandgrayrenderer.cpp
  2. +1 −1 src/mapserver/qgswmsserver.cpp
@@ -38,6 +38,7 @@ QgsRasterInterface * QgsSingleBandGrayRenderer::clone() const
renderer->setOpacity( mOpacity );
renderer->setAlphaBand( mAlphaBand );
renderer->setRasterTransparency( mRasterTransparency );
renderer->setGradient( mGradient );
if ( mContrastEnhancement )
{
renderer->setContrastEnhancement( new QgsContrastEnhancement( *mContrastEnhancement ) );
@@ -2059,7 +2059,7 @@ void QgsWMSServer::applyOpacities( const QStringList& layerList, QList< QPair< Q
if ( rasterRenderer )
{
rasterRenderers.push_back( qMakePair( rl, dynamic_cast<QgsRasterRenderer*>( rasterRenderer->clone() ) ) );
rasterRenderer->setOpacity( opacity / 255.0 );
rasterRenderer->setOpacity( rasterRenderer->opacity() * ( opacity / 255.0 ) );
}
}
}

0 comments on commit 6dcb5f4

Please sign in to comment.