Skip to content
Permalink
Browse files

Show NULL preview text in expression editor

Makes creating/debugging expressions easier for users

(cherry-picked from 1f3723)
  • Loading branch information
nyalldawson committed Jan 11, 2017
1 parent 1eb3bfc commit cfc3a86001b3978e424d25d500f1dfe07101271c
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/qgsexpression.cpp
@@ -5207,6 +5207,10 @@ QString QgsExpression::formatPreviewString( const QVariant& value )
else
return tr( "<i>&lt;geometry: %1&gt;</i>" ).arg( QgsWKBTypes::displayString( geom.geometry()->wkbType() ) );
}
else if ( !value.isValid() )
{
return tr( "<i>NULL</i>" );
}
else if ( value.canConvert< QgsFeature >() )
{
//result is a feature

0 comments on commit cfc3a86

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