Skip to content

Commit

Permalink
[attrtable] Order by the correct column when header is clicked
Browse files Browse the repository at this point in the history
The column index was messed up when columns have been reordered
  • Loading branch information
m-kuhn committed Jun 3, 2016
1 parent 4a3a814 commit 744c61c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/attributetable/qgsattributetablefiltermodel.cpp
Expand Up @@ -63,8 +63,9 @@ bool QgsAttributeTableFilterModel::lessThan( const QModelIndex &left, const QMod

void QgsAttributeTableFilterModel::sort( int column, Qt::SortOrder order )
{
masterModel()->prefetchColumnData( column );
QSortFilterProxyModel::sort( column, order );
int myColumn = mColumnMapping.at( column );
masterModel()->prefetchColumnData( myColumn );
QSortFilterProxyModel::sort( myColumn, order );
}

QVariant QgsAttributeTableFilterModel::data( const QModelIndex& index, int role ) const
Expand Down

0 comments on commit 744c61c

Please sign in to comment.