Skip to content

Commit

Permalink
Set expression context for numeric format
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 3, 2024
1 parent 0a72e53 commit 61c0a44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/symbology/qgslinearreferencingsymbollayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ void QgsLinearReferencingSymbolLayer::renderPolylineInterval( const QgsLineStrin
}

QgsNumericFormatContext numericContext;
numericContext.setExpressionContext( context.renderContext().expressionContext() );

std::unique_ptr< QgsLineString > painterUnitsGeometry( line->clone() );
if ( context.renderContext().coordinateTransform().isValid() )
Expand Down Expand Up @@ -755,6 +756,7 @@ void QgsLinearReferencingSymbolLayer::renderPolylineVertex( const QgsLineString
averageAngleLengthPainterUnits = std::max( averageAngleLengthPainterUnits, 0.1 );

QgsNumericFormatContext numericContext;
numericContext.setExpressionContext( context.renderContext().expressionContext() );

const double *xData = line->xData();
const double *yData = line->yData();
Expand Down

0 comments on commit 61c0a44

Please sign in to comment.