summaryrefslogtreecommitdiffstats
path: root/qt-ui/divelistview.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-19 06:05:43 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-19 06:05:43 -0800
commit33f7c6bb281fb40d5e56e5e6adaccd07b17769a6 (patch)
treee40900c00ce96920d86fadaffbc0a4c86e07575b /qt-ui/divelistview.cpp
parent1a876a85b903cf5fb3196779a7d00a1b32daac87 (diff)
downloadsubsurface-33f7c6bb281fb40d5e56e5e6adaccd07b17769a6.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r--qt-ui/divelistview.cpp1
1 files changed, 1 insertions, 0 deletions
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);
}