Skip to content

Commit

Permalink
QgsFieldModel use attributeDisplayName (fix #10451)
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jun 5, 2014
1 parent 2e477b1 commit 9019805
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/gui/qgsfieldmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,7 @@ QVariant QgsFieldModel::data( const QModelIndex &index, int role ) const
{
return mExpression[exprIdx];
}
QgsField field = mFields[index.internalId()];
const QMap< QString, QString > aliases = mLayer->attributeAliases();
QString alias = aliases.value( field.name(), field.name() );
return alias;
return mLayer->attributeDisplayName( index.internalId() );
}

case Qt::ForegroundRole:
Expand Down

0 comments on commit 9019805

Please sign in to comment.