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.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index a78e48777..92a10ca38 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -309,10 +309,12 @@ void DiveListView::mergeDives()
for_each_dive(i, dive) {
if (dive->selected) {
- if (!maindive)
+ if (!maindive) {
maindive = dive;
- else
+ } else {
maindive = merge_two_dives(maindive, dive);
+ i--; // otherwise we skip a dive in the freshly changed list
+ }
}
}
mainWindow()->refreshDisplay();