Skip to content
Permalink
Browse files

labeling: 'show' empty string instead of configured representation fo…

…r NULL (party reverts e497a5c; refs #9998; fixes #10151)
  • Loading branch information
jef-n committed May 2, 2014
1 parent 5093394 commit 3d916633532b8bda2641eff76d6db55426ed1278
Showing with 2 additions and 7 deletions.
  1. +2 −6 src/core/qgspallabeling.cpp
  2. +0 −1 src/core/qgspallabeling.h
@@ -449,17 +449,13 @@ QgsPalLayerSettings::QgsPalLayerSettings()

// temp stuff for when drawing label components (don't copy)
showingShadowRects = false;

QSettings settings;
mNullValue = settings.value( "qgis/nullValue", "NULL" ).toString();
}

QgsPalLayerSettings::QgsPalLayerSettings( const QgsPalLayerSettings& s )
{
// copy only permanent stuff

enabled = s.enabled;
mNullValue = s.mNullValue;

// text style
fieldName = s.fieldName;
@@ -1706,12 +1702,12 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
QgsDebugMsgLevel( QString( "Expression parser eval error:%1" ).arg( exp->evalErrorString() ), 4 );
return;
}
labelText = result.isNull() ? mNullValue : result.toString();
labelText = result.isNull() ? "" : result.toString();
}
else
{
const QVariant &v = f.attribute( fieldIndex );
labelText = v.isNull() ? mNullValue : v.toString();
labelText = v.isNull() ? "" : v.toString();
}

// data defined format numbers?
@@ -550,7 +550,6 @@ class CORE_EXPORT QgsPalLayerSettings
QMap<QgsPalLayerSettings::DataDefinedProperties, QPair<QString, int> > mDataDefinedNames;

QFontDatabase mFontDB;
QString mNullValue;
};

class CORE_EXPORT QgsLabelCandidate

0 comments on commit 3d91663

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