Skip to content
Permalink
Browse files
Add missing expression context in the extract labels alg.
  • Loading branch information
nirvn committed Jan 7, 2022
1 parent 3cfdd2d commit df22c90a2653bd2efff4f15b9d55af843a7ecac6
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/analysis/processing/qgsalgorithmextractlabels.cpp
@@ -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 );

0 comments on commit df22c90

Please sign in to comment.