Skip to content

Commit

Permalink
Server: return empty image in GetLegendGraphis if no layer is there (…
Browse files Browse the repository at this point in the history
…e.g. contextual legend)
  • Loading branch information
mhugent committed Apr 13, 2018
1 parent 4f05da4 commit bf2ed36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/qgswmsserver.cpp
Expand Up @@ -762,7 +762,7 @@ QImage* QgsWMSServer::getLegendGraphics()

if ( layersList.size() < 1 )
{
return nullptr;
return createImage( 1, 1, false );
}

//scale
Expand All @@ -782,7 +782,7 @@ QImage* QgsWMSServer::getLegendGraphics()
QStringList layerIds = mConfigParser->layerSet( layersList, stylesList, dummyCRS, scaleDenominator );
if ( layerIds.size() < 1 )
{
return nullptr;
return createImage( 1, 1, false );
}

//get icon size, spaces between legend items and font from config parser
Expand Down

0 comments on commit bf2ed36

Please sign in to comment.