Skip to content

Commit

Permalink
labeling: 'show' empty string instead of configured representation fo…
Browse files Browse the repository at this point in the history
…r NULL (party reverts e497a5c; refs #9998; fixes #10151)
  • Loading branch information
jef-n committed May 2, 2014
1 parent 5093394 commit 3d91663
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/core/qgspallabeling.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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?
Expand Down
1 change: 0 additions & 1 deletion src/core/qgspallabeling.h
Expand Up @@ -550,7 +550,6 @@ class CORE_EXPORT QgsPalLayerSettings
QMap<QgsPalLayerSettings::DataDefinedProperties, QPair<QString, int> > mDataDefinedNames;

QFontDatabase mFontDB;
QString mNullValue;
};

class CORE_EXPORT QgsLabelCandidate
Expand Down

0 comments on commit 3d91663

Please sign in to comment.