Skip to content
Permalink
Browse files
WMS featureinfo: use willRenderFeature instead of symbolForFeature
  • Loading branch information
mhugent committed Mar 2, 2012
1 parent 1a78f0b commit 0b198ba03bfbaad0a11a0cc057db72df3370d4a9
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/mapserver/qgswmsserver.cpp
@@ -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;
}

0 comments on commit 0b198ba

Please sign in to comment.