[BUGFIX] GetFeatureInfo STYLES and FILTER used together

In GetFeatureInfo WMS Request, if STYLES and FILTER are used together, it's
 like FILTER is not applied.

To fix it, we check in the QgsMapLayerRegistry if the layers associated to
 QUERY_LAYERS has already created.
This commit is contained in:
rldhont 2015-05-21 13:51:37 +02:00
parent 19c1dc69e9
commit 263d89c334

View File

@ -1497,6 +1497,11 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result, QString version )
{
continue;
}
QgsMapLayer * registeredMapLayer = QgsMapLayerRegistry::instance()->mapLayer( currentLayer->id() );
if ( registeredMapLayer )
{
currentLayer = registeredMapLayer;
}
//skip layer if not visible at current map scale
bool useScaleConstraint = ( scaleDenominator > 0 && currentLayer->hasScaleBasedVisibility() );