Skip to content

Commit

Permalink
Fix #12167 - Handle nulls in show label property for labels
Browse files Browse the repository at this point in the history
Funded by Digital Mapping Solutions
  • Loading branch information
NathanW2 committed Feb 11, 2015
1 parent edc1d5e commit a15aa74
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/qgspallabeling.cpp
Expand Up @@ -1449,10 +1449,12 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
dataDefinedValues.clear();

// data defined show label? defaults to show label if not 0
if ( dataDefinedEvaluate( QgsPalLayerSettings::Show, exprVal ) )
if ( dataDefinedIsActive( QgsPalLayerSettings::Show ) )
{
QgsDebugMsgLevel( QString( "exprVal Show:%1" ).arg( exprVal.toBool() ? "true" : "false" ), 4 );
if ( !exprVal.toBool() )
bool showLabel = dataDefinedEvaluate( QgsPalLayerSettings::Show, exprVal );
showLabel = exprVal.toBool();
QgsDebugMsgLevel( QString( "exprVal Show:%1" ).arg( showLabel ? "true" : "false" ), 4 );
if ( !showLabel )
{
return;
}
Expand Down

0 comments on commit a15aa74

Please sign in to comment.