From 33f7c6bb281fb40d5e56e5e6adaccd07b17769a6 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 19 Nov 2013 06:05:43 -0800 Subject: [PATCH] Clear selected trips after restoring selection The rememberSelection() / restoreSelection() functions ONLY handle selected dives, not selected trips. This is a bit of a misfeature, but because of that we need to make sure we clear our notion of selected trips when we use restoreSelection() Fixes #285 Signed-off-by: Dirk Hohndel --- qt-ui/divelistview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index ca0ea5713..e646bab04 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -140,6 +140,7 @@ void DiveListView::rememberSelection() void DiveListView::restoreSelection() { unselectDives(); + selectedTrips.clear(); // I wish we didn't lose those... Q_FOREACH(int i, selectedDives) { selectDive(i); }