Skip to content

Commit

Permalink
Fix labeling reference scale with null symbol renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 28, 2021
1 parent bb002d4 commit 61e924b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/vector/qgsvectorlayerrenderer.cpp
Expand Up @@ -235,6 +235,9 @@ bool QgsVectorLayerRenderer::renderInternal( QgsFeatureRenderer *renderer )
{
const bool isMainRenderer = renderer == mRenderer;

QgsRenderContext &context = *renderContext();
context.setSymbologyReferenceScale( renderer->referenceScale() );

if ( renderer->type() == QLatin1String( "nullSymbol" ) )
{
// a little shortcut for the null symbol renderer - most of the time it is not going to render anything
Expand All @@ -244,9 +247,6 @@ bool QgsVectorLayerRenderer::renderInternal( QgsFeatureRenderer *renderer )
return true;
}

QgsRenderContext &context = *renderContext();
context.setSymbologyReferenceScale( renderer->referenceScale() );

QgsScopedQPainterState painterState( context.painter() );

// MUST be created in the thread doing the rendering
Expand Down

0 comments on commit 61e924b

Please sign in to comment.