Skip to content

Commit

Permalink
Show preview text for map layer values in expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 27, 2018
1 parent 3b9821f commit 367d0be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/expression/qgsexpression.cpp
Expand Up @@ -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>" );
Expand Down

0 comments on commit 367d0be

Please sign in to comment.