Skip to content

Commit

Permalink
Add missing expression context in the extract labels alg.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jan 7, 2022
1 parent 3cfdd2d commit df22c90
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/analysis/processing/qgsalgorithmextractlabels.cpp
Expand Up @@ -336,6 +336,13 @@ QVariantMap QgsExtractLabelsAlgorithm::processAlgorithm( const QVariantMap &para
mapSettings.setLayerStyleOverrides( mMapThemeStyleOverrides );
mapSettings.setLabelingEngineSettings( mLabelSettings );

//build the expression context
QgsExpressionContext expressionContext;
expressionContext << QgsExpressionContextUtils::globalScope()
<< QgsExpressionContextUtils::projectScope( context.project() )
<< QgsExpressionContextUtils::mapSettingsScope( mapSettings );
mapSettings.setExpressionContext( expressionContext );

QgsNullPaintDevice nullPaintDevice;
nullPaintDevice.setOutputSize( imageSize );
nullPaintDevice.setOutputDpi( dpi );
Expand Down

0 comments on commit df22c90

Please sign in to comment.