diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-13 19:01:36 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-07 08:56:57 -0700 |
commit | 532449644eebd3011b47bff799305684bf75de65 (patch) | |
tree | 682aaf51ebc932b82eede2b4d0ea0fff96ba91f3 | |
parent | 326772cbdbdbfd29b953a21fabb722676ffedfdc (diff) | |
download | subsurface-532449644eebd3011b47bff799305684bf75de65.tar.gz |
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 <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 |