mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Clear statistics and equipment when no dive is selected
This all seems very strange forward. The reason for the check whether the stats_w widget has been populated is that at the very beginning, when the UI is still being assembled, a first call to switch_page() happens as the notebook pages are assembled. At that point the stats_w widget is still empty which tells us that we aren't ready to display anything. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ef55ddccb5
commit
6ce4d29f49
3 changed files with 8 additions and 7 deletions
6
main.c
6
main.c
|
@ -247,10 +247,8 @@ void update_dive(struct dive *new_dive)
|
|||
flush_divelist(old_dive);
|
||||
}
|
||||
show_dive_info(new_dive);
|
||||
if (new_dive) {
|
||||
show_dive_equipment(new_dive, W_IDX_PRIMARY);
|
||||
show_dive_stats(new_dive);
|
||||
}
|
||||
show_dive_equipment(new_dive, W_IDX_PRIMARY);
|
||||
show_dive_stats(new_dive);
|
||||
buffered_dive = new_dive;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue