Skip to content

Commit

Permalink
[BUGFIX] GetFeatureInfo STYLES and FILTER used together
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rldhont committed May 21, 2015
1 parent 19c1dc6 commit 263d89c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/qgswmsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand Down

0 comments on commit 263d89c

Please sign in to comment.