Skip to content

Commit

Permalink
In case of a null variant, the default value is returned (otherwise m…
Browse files Browse the repository at this point in the history
…oved labels/diagrams are not displayed on opening when show/hide DD are NULL)
  • Loading branch information
pblottiere committed Oct 9, 2017
1 parent 283d796 commit c4dd1d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsproperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ bool QgsProperty::valueAsBool( const QgsExpressionContext &context, bool default
bool valOk = false;
QVariant val = value( context, defaultValue, &valOk );

if ( !valOk || !val.isValid() )
if ( !valOk || !val.isValid() || val.isNull() )
return defaultValue;

if ( ok )
Expand Down

0 comments on commit c4dd1d4

Please sign in to comment.