Clear yearly statistics when closing data file

Another oversight of what needed to be done when cleaning up the UI after
closing the data file.

Reported-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-02-01 00:19:03 +11:00
parent 0f2fac265f
commit b709dff23d
2 changed files with 3 additions and 1 deletions

View file

@ -249,6 +249,7 @@ static void file_close(GtkWidget *w, gpointer data)
process_selected_dives();
clear_stats_widgets();
clear_events();
show_dive_stats(NULL);
/* clear the equipment page */
clear_equipment_widgets();

View file

@ -543,7 +543,8 @@ static void show_single_dive_stats(struct dive *dive)
struct tm tm;
process_all_dives(dive, &prev_dive);
if (!dive)
return;
utc_mkdate(dive->when, &tm);
snprintf(buf, sizeof(buf),
/*++GETTEXT 80 chars: weekday, monthname, day, year, hour, min */