From a83bc5ecdb5edc2834335f77711f8fb262ef5273 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 28 Nov 2019 15:38:36 +0100 Subject: 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 --- desktop-widgets/divelistview.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'desktop-widgets') 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(); } } -- cgit v1.2.3-70-g09d2