Skip to content
Permalink
Browse files
Fix labeling reference scale with null symbol renderer
  • Loading branch information
nyalldawson committed Jun 28, 2021
1 parent bb002d4 commit 61e924b78c569bd19bc6728a205f8512e2d1c156
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/vector/qgsvectorlayerrenderer.cpp
@@ -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
@@ -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

0 comments on commit 61e924b

Please sign in to comment.