aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/command_divelist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/command_divelist.cpp')
-rw-r--r--desktop-widgets/command_divelist.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/desktop-widgets/command_divelist.cpp b/desktop-widgets/command_divelist.cpp
index d3ecfb796..7fbda35dc 100644
--- a/desktop-widgets/command_divelist.cpp
+++ b/desktop-widgets/command_divelist.cpp
@@ -423,7 +423,12 @@ void DiveListBase::restoreSelection(const std::vector<dive *> &selection, dive *
});
bool currentDiveChanged = false;
- if (current_dive != currentDive) {
+ // If currentDive is null, we have no current dive. In such a case always
+ // signal the frontend.
+ if (!currentDive) {
+ currentDiveChanged = true;
+ emit diveListNotifier.currentDiveChanged();
+ } else if (current_dive != currentDive) {
currentDiveChanged = true;
// We cannot simply change the currentd dive to the given dive.