Skip to content

Commit

Permalink
Optimise logic about when a random marker fill / point pattern fill
Browse files Browse the repository at this point in the history
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 3429203
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/symbology/qgsfillsymbollayer.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit 3429203

Please sign in to comment.