Skip to content

Commit 5cd8cb6

Browse files
committedMay 21, 2019
Ensure NULL item shows before field names in expression builder, instead of mixed inside them
1 parent 58c82c3 commit 5cd8cb6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/gui/qgsexpressionbuilderwidget.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,8 @@ void QgsExpressionBuilderWidget::updateFunctionTree()
633633
QString casestring = QStringLiteral( "CASE WHEN condition THEN result END" );
634634
registerItem( QStringLiteral( "Conditionals" ), QStringLiteral( "CASE" ), casestring );
635635

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

638639
// Load the functions from the QgsExpression class
639640
int count = QgsExpression::functionCount();

0 commit comments

Comments
 (0)