Navigation Menu

Skip to content

Commit

Permalink
Highlight form functions/variables in value relation filter edit
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 16, 2018
1 parent 0a628ff commit 814594f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/editorwidgets/qgsvaluerelationconfigdlg.cpp
Expand Up @@ -94,6 +94,11 @@ void QgsValueRelationConfigDlg::editExpression()
QgsExpressionContext context( QgsExpressionContextUtils::globalProjectLayerScopes( vl ) );
context << QgsExpressionContextUtils::formScope( );

context.setHighlightedFunctions( QStringList() << QStringLiteral( "current_value" ) );
context.setHighlightedVariables( QStringList() << QStringLiteral( "current_geometry" )
<< QStringLiteral( "current_feature" )
<< QStringLiteral( "form_mode" ) );

QgsExpressionBuilderDialog dlg( vl, mFilterExpression->toPlainText(), this, QStringLiteral( "generic" ), context );
dlg.setWindowTitle( tr( "Edit Filter Expression" ) );

Expand Down

0 comments on commit 814594f

Please sign in to comment.