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:
Dirk Hohndel 2013-02-18 16:56:28 -08:00
parent ef55ddccb5
commit 6ce4d29f49
3 changed files with 8 additions and 7 deletions

View file

@ -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);