Skip to content
Permalink
Browse files

Attribute table: always show sequential column header numbers

  • Loading branch information
m-kuhn committed Jun 16, 2016
1 parent 4746158 commit 9f704d6e92b922555bddb3a5a648edaac2aedf34
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/gui/attributetable/qgsattributetablefiltermodel.cpp
@@ -97,8 +97,13 @@ QVariant QgsAttributeTableFilterModel::headerData( int section, Qt::Orientation
}
else
{
int sourceSection = mapToSource( index( section, mColumnMapping.at( 0 ) == -1 ? 1 : 0 ) ).row();
return sourceModel()->headerData( sourceSection, orientation, role );
if ( role == Qt::DisplayRole )
return section + 1;
else
{
int sourceSection = mapToSource( index( section, mColumnMapping.at( 0 ) == -1 ? 1 : 0 ) ).row();
return sourceModel()->headerData( sourceSection, orientation, role );
}
}
}

4 comments on commit 9f704d6

@m-kuhn

This comment has been minimized.

Copy link
Member Author

@m-kuhn m-kuhn replied Jun 16, 2016

Should be row headers of course

@NathanW2

This comment has been minimized.

Copy link
Member

@NathanW2 NathanW2 replied Jun 16, 2016

Maybe there is a good use case to also show the feature id in the attribute table, maybe in the row header in row id (feature id)

@m-kuhn

This comment has been minimized.

Copy link
Member Author

@m-kuhn m-kuhn replied Jun 16, 2016

Or in the tooltip?

@NathanW2

This comment has been minimized.

Copy link
Member

@NathanW2 NathanW2 replied Jun 16, 2016

Tooltip is good for now, mainly just so that you can match if you need to for what ever reason.

Please sign in to comment.
You can’t perform that action at this time.