Skip to content

Commit

Permalink
Ensure NULL item shows before field names in expression builder, inst…
Browse files Browse the repository at this point in the history
…ead of mixed inside them
  • Loading branch information
nyalldawson committed May 21, 2019
1 parent 1f0fbd1 commit 7cd2483
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/qgsexpressionbuilderwidget.cpp
Expand Up @@ -626,7 +626,8 @@ void QgsExpressionBuilderWidget::updateFunctionTree()
QString casestring = QStringLiteral( "CASE WHEN condition THEN result END" );
registerItem( QStringLiteral( "Conditionals" ), QStringLiteral( "CASE" ), casestring );

registerItem( QStringLiteral( "Fields and Values" ), QStringLiteral( "NULL" ), QStringLiteral( "NULL" ) );
// use -1 as sort order here -- NULL should always show before the field list
registerItem( QStringLiteral( "Fields and Values" ), QStringLiteral( "NULL" ), QStringLiteral( "NULL" ), QString(), QgsExpressionItem::ExpressionNode, false, -1 );

// Load the functions from the QgsExpression class
int count = QgsExpression::functionCount();
Expand Down

0 comments on commit 7cd2483

Please sign in to comment.