Skip to content

Commit cfc3a86

Browse files
committedJan 11, 2017
Show NULL preview text in expression editor
Makes creating/debugging expressions easier for users (cherry-picked from 1f3723)
1 parent 1eb3bfc commit cfc3a86

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/core/qgsexpression.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5207,6 +5207,10 @@ QString QgsExpression::formatPreviewString( const QVariant& value )
52075207
else
52085208
return tr( "<i>&lt;geometry: %1&gt;</i>" ).arg( QgsWKBTypes::displayString( geom.geometry()->wkbType() ) );
52095209
}
5210+
else if ( !value.isValid() )
5211+
{
5212+
return tr( "<i>NULL</i>" );
5213+
}
52105214
else if ( value.canConvert< QgsFeature >() )
52115215
{
52125216
//result is a feature

0 commit comments

Comments
 (0)
Please sign in to comment.