summaryrefslogtreecommitdiffstats
path: root/qt-ui/divelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r--qt-ui/divelistview.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 91b3dadf5..1f716ed57 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -190,8 +190,13 @@ void DiveListView::selectTrip(dive_trip_t *trip)
void DiveListView::unselectDives()
{
selectionModel()->clearSelection();
- if (amount_selected != 0)
- qDebug() << "selection information inconsistent";
+ // clearSelection should emit selectionChanged() but sometimes that
+ // appears not to happen
+ int i;
+ struct dive *dive;
+ for_each_dive(i, dive) {
+ deselect_dive(i);
+ }
}
QList<dive_trip_t *> DiveListView::selectedTrips()