diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-02-18 16:56:28 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-18 17:00:18 -0800 |
commit | 6ce4d29f4907ec26486d9a16fee29edf1637b543 (patch) | |
tree | 494fbc383234f9f92445725f6694863995b19d7c /main.c | |
parent | ef55ddccb5bff1672e72947500c97fec51963358 (diff) | |
download | subsurface-6ce4d29f4907ec26486d9a16fee29edf1637b543.tar.gz |
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>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; } |