Skip to content
Permalink
Browse files

Highlight form functions/variables in value relation filter edit

  • Loading branch information
nyalldawson committed Oct 16, 2018
1 parent 0a628ff commit 814594f1457028ea33784f9b6961a59bd9127fc5
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/gui/editorwidgets/qgsvaluerelationconfigdlg.cpp
@@ -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" ) );

0 comments on commit 814594f

Please sign in to comment.
You can’t perform that action at this time.