Skip to content
Permalink
Browse files

Opacity should also be considered for external layers

  • Loading branch information
mhugent committed Mar 12, 2021
1 parent 6c6fd06 commit 17044f4d3da12e9112d416d582af4f7aab40f940
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
@@ -1576,6 +1576,9 @@ namespace QgsWms
QgsWmsParametersLayer param;
param.mNickname = layer;

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

if ( isExternalLayer( layer ) )
{
const QgsWmsParametersExternalLayer extParam = externalLayerParameter( layer );
@@ -1587,9 +1590,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 );
@@ -3285,6 +3285,11 @@ namespace QgsWms
continue;
}

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

if ( mContext.isExternalLayer( param.mNickname ) )
{
continue;
@@ -3299,11 +3304,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 17044f4

Please sign in to comment.