From 532449644eebd3011b47bff799305684bf75de65 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 13 Apr 2020 19:01:36 +0200 Subject: desktop: update tab info only if current_dive is set If current_dive was not set, the code would clear the tabs right after updating the data. We might just as well set the data only if current_dive is set. Signed-off-by: Berthold Stoeger Signed-off-by: Dirk Hohndel --- desktop-widgets/tab-widgets/maintab.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'desktop-widgets/tab-widgets/maintab.cpp') diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index d63f59692..a285abbcd 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -355,10 +355,10 @@ void MainTab::updateDiveInfo() ignoreInput = true; // don't trigger on changes to the widgets - for (TabBase *widget: extraWidgets) - widget->updateData(); - if (current_dive) { + for (TabBase *widget: extraWidgets) + widget->updateData(); + // If we're on the dive-site tab, we don't want to switch tab when entering / exiting // trip mode. The reason is that // 1) this disrupts the user-experience and -- cgit v1.2.3-70-g09d2