Skip to content

Commit 4a3a814

Browse files
committedJun 3, 2016
[attrtable] Show row numbers when first column is action widget
1 parent 95f8139 commit 4a3a814

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/gui/attributetable/qgsattributetablefiltermodel.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ QVariant QgsAttributeTableFilterModel::headerData( int section, Qt::Orientation
9595
return QSortFilterProxyModel::headerData( section, orientation, role );
9696
}
9797
else
98-
return QSortFilterProxyModel::headerData( section, orientation, role );
98+
{
99+
int sourceSection = mapToSource( index( section, mColumnMapping.at( 0 ) == -1 ? 1 : 0 ) ).row();

Comment on line R99

rouault commented on Jun 20, 2016

@rouault
Contributor

@m-kuhn
In case you want to check my fix ( 1cd7808 ) is appropriate, this commit caused http://hub.qgis.org/issues/15047
Not sure why the failed test didn't trigger on Travis: perhaps because it relies on a non-debug build of QT ?

Code has comments. Press enter to view.
100+
return sourceModel()->headerData( sourceSection, orientation, role );
101+
}
99102
}
100103

101104
int QgsAttributeTableFilterModel::actionColumnIndex() const

0 commit comments

Comments
 (0)
Please sign in to comment.