diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-28 15:38:36 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2019-12-04 13:00:23 +0100 |
commit | a83bc5ecdb5edc2834335f77711f8fb262ef5273 (patch) | |
tree | 04cf55c9bee7f7149be678d5c0b72737efef4abc | |
parent | 55ffd5d1b5e5fddaac9baec914ace4e07fff667c (diff) | |
download | subsurface-a83bc5ecdb5edc2834335f77711f8fb262ef5273.tar.gz |
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>
-rw-r--r-- | desktop-widgets/divelistview.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp index 83d8b14f2..326e82d5a 100644 --- a/desktop-widgets/divelistview.cpp +++ b/desktop-widgets/divelistview.cpp @@ -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(); } } |