Skip to content
Permalink
Browse files
added missing roles in field model data
  • Loading branch information
3nids committed Apr 4, 2014
1 parent 8b06a16 commit a4fc1ba28001c01afd48f587b6776def5fa9d7d9
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/gui/qgsfieldmodel.cpp
@@ -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()];

0 comments on commit a4fc1ba

Please sign in to comment.