Skip to content
Permalink
Browse files

[attrtable] Order by the correct column when header is clicked

The column index was messed up when columns have been reordered
  • Loading branch information
m-kuhn committed Jun 3, 2016
1 parent 4a3a814 commit 744c61cb19d2221f09737eb919fbf41c92d0eb28
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/gui/attributetable/qgsattributetablefiltermodel.cpp
@@ -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

0 comments on commit 744c61c

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