Skip to content
Permalink
Browse files
Optimise logic about when a random marker fill / point pattern fill
needs to set expression context variables for each individual rendered
point

We shouldn't consider data defined properties for the fill itself,
only for the subsymbol
  • Loading branch information
nyalldawson committed Oct 25, 2021
1 parent 2bbd6da commit 342920324291d468c63f4965910dddc41cc8e53d
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/symbology/qgsfillsymbollayer.cpp
@@ -3808,7 +3808,7 @@ void QgsPointPatternFillSymbolLayer::renderPolygon( const QPolygonF &points, con
QgsExpressionContextScope *scope = new QgsExpressionContextScope();
QgsExpressionContextScopePopper scopePopper( context.renderContext().expressionContext(), scope );
int pointNum = 0;
const bool needsExpressionContext = hasDataDefinedProperties();
const bool needsExpressionContext = mMarkerSymbol->hasDataDefinedProperties();

const bool prevIsSubsymbol = context.renderContext().flags() & Qgis::RenderContextFlag::RenderingSubSymbol;
context.renderContext().setFlag( Qgis::RenderContextFlag::RenderingSubSymbol );
@@ -4907,7 +4907,7 @@ void QgsRandomMarkerFillSymbolLayer::render( QgsRenderContext &context, const QV
QgsExpressionContextScope *scope = new QgsExpressionContextScope();
QgsExpressionContextScopePopper scopePopper( context.expressionContext(), scope );
int pointNum = 0;
const bool needsExpressionContext = hasDataDefinedProperties();
const bool needsExpressionContext = mMarker->hasDataDefinedProperties();

const bool prevIsSubsymbol = context.flags() & Qgis::RenderContextFlag::RenderingSubSymbol;
context.setFlag( Qgis::RenderContextFlag::RenderingSubSymbol );

0 comments on commit 3429203

Please sign in to comment.