Skip to content
Permalink
Browse files

[labels] Fix null data defined value was not ignored in some cases

  • Loading branch information
nyalldawson committed Jul 8, 2015
1 parent fa46411 commit eb6279ac5a64f14208d07c305d64e28a354629bb
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/app/qgslabelpropertydialog.cpp
  2. +1 −1 src/core/qgspallabeling.cpp
@@ -219,7 +219,7 @@ void QgsLabelPropertyDialog::setDataDefinedValues( const QgsPalLayerSettings &la
}

QVariant result = layerSettings.dataDefinedValue( propIt.key(), mCurLabelFeat, vlayer->pendingFields() );
if ( !result.isValid() )
if ( !result.isValid() || result.isNull() )
{
//could not evaluate data defined value
continue;
@@ -1205,7 +1205,7 @@ bool QgsPalLayerSettings::dataDefinedEvaluate( DataDefinedProperties p, QVariant

QVariant result = dataDefinedValue( p, *mCurFeat, *mCurFields );

if ( result.isValid() ) // filter NULL values? i.e. && !result.isNull()
if ( result.isValid() && !result.isNull() )
{
//QgsDebugMsgLevel( QString( "result type:" ) + QString( result.typeName() ), 4 );
//QgsDebugMsgLevel( QString( "result string:" ) + result.toString(), 4 );

0 comments on commit eb6279a

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