Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WMS featureinfo: use willRenderFeature instead of symbolForFeature
  • Loading branch information
mhugent committed Mar 2, 2012
1 parent 1a78f0b commit 0b198ba
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/mapserver/qgswmsserver.cpp
Expand Up @@ -1257,7 +1257,16 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
if ( layer->isUsingRendererV2() )
{
QgsFeatureRendererV2* r2 = layer->rendererV2();
if ( !r2 || !r2->symbolForFeature( feature ) )
if ( !r2 )
{
continue;
}

QgsRenderContext c;
r2->startRender( c, layer );
bool renderV2 = r2->willRenderFeature( feature );
r2->stopRender( c );
if ( !renderV2 )
{
continue;
}
Expand Down

0 comments on commit 0b198ba

Please sign in to comment.