Skip to content

Commit

Permalink
Skip the configure part for an external layer
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Sep 2, 2020
1 parent ffc6561 commit 87ec664
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/server/services/wms/qgswmsrendercontext.h
Expand Up @@ -244,6 +244,12 @@ namespace QgsWms
*/
int mapHeight() const;

/**
* Returns true if the layer is an external layer, false otherwise.
* \since QGIS 3.16
*/
bool isExternalLayer( const QString &name ) const;

private:
void initNicknameLayers();
void initRestrictedLayers();
Expand All @@ -258,8 +264,6 @@ namespace QgsWms

bool layerScaleVisibility( const QString &name ) const;

bool isExternalLayer( const QString &name ) const;

const QgsProject *mProject = nullptr;
QgsServerInterface *mInterface = nullptr;
QgsWmsParameters mParameters;
Expand Down
5 changes: 5 additions & 0 deletions src/server/services/wms/qgswmsrenderer.cpp
Expand Up @@ -3098,6 +3098,11 @@ namespace QgsWms
continue;
}

if ( mContext.isExternalLayer( param.mNickname ) )
{
continue;
}

if ( useSld )
{
setLayerSld( layer, mContext.sld( *layer ) );
Expand Down

0 comments on commit 87ec664

Please sign in to comment.