Skip to content

Commit

Permalink
added missing roles in field model data
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Apr 4, 2014
1 parent 8b06a16 commit a4fc1ba
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/gui/qgsfieldmodel.cpp
Expand Up @@ -107,6 +107,17 @@ QVariant QgsFieldModel::data( const QModelIndex &index, int role ) const
if ( !mLayer )
return QVariant();

if ( role == FieldNameRole )
{
QgsField field = mFields[index.internalId()];
return field.name();
}

if ( role == FieldIndexRole )
{
return index.row();
}

if ( role == Qt::DisplayRole )
{
QgsField field = mFields[index.internalId()];
Expand Down

0 comments on commit a4fc1ba

Please sign in to comment.