summaryrefslogtreecommitdiffstats
path: root/equipment.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-18 16:56:28 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-18 17:00:18 -0800
commit6ce4d29f4907ec26486d9a16fee29edf1637b543 (patch)
tree494fbc383234f9f92445725f6694863995b19d7c /equipment.c
parentef55ddccb5bff1672e72947500c97fec51963358 (diff)
downloadsubsurface-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 'equipment.c')
-rw-r--r--equipment.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/equipment.c b/equipment.c
index f28050949..f0a9df478 100644
--- a/equipment.c
+++ b/equipment.c
@@ -573,6 +573,7 @@ static void show_equipment(struct dive *dive, int max,
gtk_widget_set_sensitive(equipment_list->edit, 0);
gtk_widget_set_sensitive(equipment_list->del, 0);
gtk_widget_set_sensitive(equipment_list->add, 0);
+ clear_equipment_widgets();
return;
}
gtk_list_store_clear(model);