Skip to content
Permalink
Browse files

Show a preview string for intervals in expression builder

  • Loading branch information
nyalldawson committed Dec 3, 2015
1 parent b31d9be commit 1d1546ffb8da80974ffc76388378fe835a317a1a
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/gui/qgsexpressionbuilderwidget.cpp
@@ -615,6 +615,12 @@ QString QgsExpressionBuilderWidget::formatPreviewString( const QVariant& value )
QgsFeature feat = value.value<QgsFeature>();
return tr( "<i>&lt;feature: %1&gt;</i>" ).arg( feat.id() );
}
else if ( value.canConvert< QgsExpression::Interval >() )
{
//result is a feature
QgsExpression::Interval interval = value.value<QgsExpression::Interval>();
return tr( "<i>&lt;interval: %1 days&gt;</i>" ).arg( interval.days() );
}
else
{
QString previewString = value.toString();

0 comments on commit 1d1546f

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