Skip to content
Permalink
Browse files

Server: return empty image in GetLegendGraphis if no layer is there (…

…e.g. contextual legend)
  • Loading branch information
mhugent committed Apr 13, 2018
1 parent 4f05da4 commit bf2ed36ba3e974ab4e163942d141dbc4d2e0c068
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/server/qgswmsserver.cpp
@@ -762,7 +762,7 @@ QImage* QgsWMSServer::getLegendGraphics()

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

//scale
@@ -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

0 comments on commit bf2ed36

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