aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/maintab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/tab-widgets/maintab.cpp')
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index 5f740b969..92e55784f 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -1058,11 +1058,11 @@ void MainTab::rejectChanges()
MainWindow::instance()->dive_list()->restoreSelection();
// now make sure that the correct dive is displayed
- if (selected_dive >= 0)
+ if (current_dive)
copy_dive(current_dive, &displayed_dive);
else
clear_dive(&displayed_dive);
- updateDiveInfo(selected_dive < 0);
+ updateDiveInfo(!current_dive);
for (auto widget : extraWidgets) {
widget->updateData();