mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
326772cbdb
commit
532449644e
1 changed files with 3 additions and 3 deletions
|
@ -355,10 +355,10 @@ void MainTab::updateDiveInfo()
|
||||||
|
|
||||||
ignoreInput = true; // don't trigger on changes to the widgets
|
ignoreInput = true; // don't trigger on changes to the widgets
|
||||||
|
|
||||||
|
if (current_dive) {
|
||||||
for (TabBase *widget: extraWidgets)
|
for (TabBase *widget: extraWidgets)
|
||||||
widget->updateData();
|
widget->updateData();
|
||||||
|
|
||||||
if (current_dive) {
|
|
||||||
// If we're on the dive-site tab, we don't want to switch tab when entering / exiting
|
// If we're on the dive-site tab, we don't want to switch tab when entering / exiting
|
||||||
// trip mode. The reason is that
|
// trip mode. The reason is that
|
||||||
// 1) this disrupts the user-experience and
|
// 1) this disrupts the user-experience and
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue