Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Show NULL preview text in expression editor
Makes creating/debugging expressions easier for users
  • Loading branch information
nyalldawson committed Dec 26, 2016
1 parent 64f8b4d commit 1f37238
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/qgsexpression.cpp
Expand Up @@ -5905,6 +5905,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
Expand Down

0 comments on commit 1f37238

Please sign in to comment.