Skip to content
Permalink
Browse files

[Server] WMS GetPrint group layers: use const list

  • Loading branch information
rldhont authored and nyalldawson committed Apr 24, 2020
1 parent 815b18f commit fe078c899aedf8fbbd567d26ba07b1f7965c7e47
Showing with 3 additions and 10 deletions.
  1. +1 −9 src/server/services/wms/qgswmsrendercontext.cpp
  2. +2 −1 src/server/services/wms/qgswmsrenderer.cpp
@@ -289,15 +289,7 @@ bool QgsWmsRenderContext::isValidLayer( const QString &nickname ) const

QList<QgsMapLayer *> QgsWmsRenderContext::layersFromGroup( const QString &nickname ) const
{
QList<QgsMapLayer *> layers;
if ( mLayerGroups.contains( nickname ) )
{
for ( QgsMapLayer *layer : mLayerGroups[nickname] )
{
layers.append( layer );
}
}
return layers;
return mLayerGroups.value( nickname );
}

bool QgsWmsRenderContext::isValidGroup( const QString &name ) const
@@ -620,7 +620,8 @@ namespace QgsWms
{
QList<QgsMapLayer *> layersFromGroup;

for ( QgsMapLayer *layerFromGroup : mContext.layersFromGroup( layer.mNickname ) )
const QList<QgsMapLayer *> cLayersFromGroup = mContext.layersFromGroup( layer.mNickname );
for ( QgsMapLayer *layerFromGroup : cLayersFromGroup )
{

if ( ! layerFromGroup )

0 comments on commit fe078c8

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