Skip to content
Permalink
Browse files

Don't label features which are not rendered.

git-svn-id: http://svn.osgeo.org/qgis/trunk@12206 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Nov 20, 2009
1 parent 27aa56b commit 04c2a50f676204594b3d127aa23a7dbe45fc4562
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/qgsvectorlayer.cpp
@@ -704,7 +704,7 @@ void QgsVectorLayer::drawRendererV2( QgsRenderContext& rendererContext, bool lab
else
mRendererV2->renderFeature( fet, rendererContext );

if ( labeling )
if ( labeling && mRendererV2->symbolForFeature( fet ) != NULL )
rendererContext.labelingEngine()->registerFeature( this, fet );

if ( mEditable )
@@ -749,7 +749,7 @@ void QgsVectorLayer::drawRendererV2Levels( QgsRenderContext& rendererContext, bo
}
features[sym].append( fet );

if ( labeling )
if ( labeling && mRendererV2->symbolForFeature( fet ) != NULL )
rendererContext.labelingEngine()->registerFeature( this, fet );

if ( mEditable )
@@ -972,7 +972,7 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
//double scale = rendererContext.scaleFactor() / markerScaleFactor;
drawFeature( rendererContext, fet, &marker );

if ( labeling )
if ( labeling && mRenderer->willRenderFeature( &fet ) )
{
rendererContext.labelingEngine()->registerFeature( this, fet );
}

0 comments on commit 04c2a50

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