Skip to content
Permalink
Browse files

Show preview text for map layer values in expressions

  • Loading branch information
nyalldawson committed Aug 27, 2018
1 parent 3b9821f commit 367d0befe4835c0bb48298649353c4b6e7e64937
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/expression/qgsexpression.cpp
@@ -854,6 +854,10 @@ QString QgsExpression::formatPreviewString( const QVariant &value )
else
return tr( "<i>&lt;geometry: %1&gt;</i>" ).arg( QgsWkbTypes::displayString( geom.constGet()->wkbType() ) );
}
else if ( value.value< QgsWeakMapLayerPointer >().data() )
{
return tr( "<i>&lt;map layer&gt;</i>" );
}
else if ( !value.isValid() )
{
return tr( "<i>NULL</i>" );

0 comments on commit 367d0be

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