Skip to content
Permalink
Browse files

Fix #12167 - Handle nulls in show label property for labels

Funded by Digital Mapping Solutions
  • Loading branch information
NathanW2 committed Feb 11, 2015
1 parent edc1d5e commit a15aa74bb7e4b457b67624882413b72b2e862cd6
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/core/qgspallabeling.cpp
@@ -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;
}

0 comments on commit a15aa74

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