Selection: don't reset selection when resorting
The old code saved, cleared and restored the selection. This is not necessary anymore, because on model reset the selection, which is stored in the core, is reset. Remove the unnecessary selection handling. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
55ffd5d1b5
commit
a83bc5ecdb
@ -480,8 +480,6 @@ void DiveListView::sortIndicatorChanged(int i, Qt::SortOrder order)
|
||||
sortByColumn(i, order);
|
||||
} else {
|
||||
// clear the model, repopulate with new indexes.
|
||||
rememberSelection();
|
||||
unselectDives();
|
||||
if (currentLayout == DiveTripModelBase::TREE)
|
||||
backupExpandedRows();
|
||||
currentLayout = newLayout;
|
||||
@ -489,7 +487,6 @@ void DiveListView::sortIndicatorChanged(int i, Qt::SortOrder order)
|
||||
sortByColumn(i, order);
|
||||
if (newLayout == DiveTripModelBase::TREE)
|
||||
restoreExpandedRows();
|
||||
restoreSelection();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user