Skip to content

Commit

Permalink
Merge pull request #60232 from qgis/backport-60144-to-release-3_40
Browse files Browse the repository at this point in the history
[Backport release-3_40] Add general expresion context in raster temporal properties
  • Loading branch information
troopa81 authored Jan 23, 2025
2 parents 2c97b8d + c55a085 commit 4a75e6e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gui/raster/qgsrasterlayertemporalpropertieswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ void QgsRasterLayerTemporalPropertiesWidget::calculateRangeByExpression( bool is
bandScope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "band_description" ), mLayer->dataProvider()->bandDescription( 1 ), true, false, tr( "Band description" ) ) );

expressionContext.appendScope( bandScope );
expressionContext.appendScopes( QgsExpressionContextUtils::globalProjectLayerScopes( mLayer ) );
expressionContext.setHighlightedVariables( { QStringLiteral( "band" ), QStringLiteral( "band_name" ), QStringLiteral( "band_description" ) } );

QgsExpressionBuilderDialog dlg = QgsExpressionBuilderDialog( nullptr, isUpper ? mFixedRangeUpperExpression : mFixedRangeLowerExpression, this, QStringLiteral( "generic" ), expressionContext );
Expand Down

0 comments on commit 4a75e6e

Please sign in to comment.