Skip to content
Permalink
Browse files
Opacity should also be considered for external layers
  • Loading branch information
mhugent authored and nyalldawson committed Apr 17, 2021
1 parent e8b7c9e commit ac5b7eae97ee93bd64cfaf05e21df9e4b36f4fd3
Showing with 8 additions and 8 deletions.
  1. +3 −3 src/server/services/wms/qgswmsparameters.cpp
  2. +5 −5 src/server/services/wms/qgswmsrenderer.cpp
@@ -1539,6 +1539,9 @@ namespace QgsWms
QgsWmsParametersLayer param;
param.mNickname = layer;

if ( i < opacities.count() )
param.mOpacity = opacities[i];

if ( isExternalLayer( layer ) )
{
const QgsWmsParametersExternalLayer extParam = externalLayerParameter( layer );
@@ -1550,9 +1553,6 @@ namespace QgsWms
if ( i < styles.count() )
param.mStyle = styles[i];

if ( i < opacities.count() )
param.mOpacity = opacities[i];

if ( filters.contains( layer ) )
{
auto it = filters.find( layer );
@@ -3208,6 +3208,11 @@ namespace QgsWms
continue;
}

if ( mContext.testFlag( QgsWmsRenderContext::UseOpacity ) )
{
setLayerOpacity( layer, param.mOpacity );
}

if ( mContext.isExternalLayer( param.mNickname ) )
{
continue;
@@ -3222,11 +3227,6 @@ namespace QgsWms
setLayerStyle( layer, mContext.style( *layer ) );
}

if ( mContext.testFlag( QgsWmsRenderContext::UseOpacity ) )
{
setLayerOpacity( layer, param.mOpacity );
}

if ( mContext.testFlag( QgsWmsRenderContext::UseFilter ) )
{
setLayerFilter( layer, param.mFilter );

0 comments on commit ac5b7ea

Please sign in to comment.