Skip to content

Commit

Permalink
fix old labeling (fixes #8030)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 10, 2013
1 parent 8284300 commit 42d57d6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/core/qgslabel.cpp
Expand Up @@ -65,12 +65,8 @@ QgsLabel::~QgsLabel()

QString QgsLabel::fieldValue( int attr, QgsFeature &feature )
{
if ( mLabelFieldIdx[attr] == -1 )
{
return QString();
}

return feature.attribute( attr ).toString();
int idx = mLabelFieldIdx[attr];
return idx < 0 ? QString() : feature.attribute( idx ).toString();
}

void QgsLabel::renderLabel( QgsRenderContext &renderContext,
Expand Down

0 comments on commit 42d57d6

Please sign in to comment.