mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[attrtable] Order by the correct column when header is clicked
The column index was messed up when columns have been reordered
This commit is contained in:
parent
4a3a814d08
commit
744c61cb19
@ -63,8 +63,9 @@ bool QgsAttributeTableFilterModel::lessThan( const QModelIndex &left, const QMod
|
|||||||
|
|
||||||
void QgsAttributeTableFilterModel::sort( int column, Qt::SortOrder order )
|
void QgsAttributeTableFilterModel::sort( int column, Qt::SortOrder order )
|
||||||
{
|
{
|
||||||
masterModel()->prefetchColumnData( column );
|
int myColumn = mColumnMapping.at( column );
|
||||||
QSortFilterProxyModel::sort( column, order );
|
masterModel()->prefetchColumnData( myColumn );
|
||||||
|
QSortFilterProxyModel::sort( myColumn, order );
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant QgsAttributeTableFilterModel::data( const QModelIndex& index, int role ) const
|
QVariant QgsAttributeTableFilterModel::data( const QModelIndex& index, int role ) const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user