Skip to content
Permalink
Browse files

[Server] WMS GetPrint group layers: use const list

  • Loading branch information
rldhont committed Apr 24, 2020
1 parent d485744 commit 69170973e9bf7f4b88221e12073df00a40e6e78c
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
@@ -593,7 +593,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 6917097

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