Catch changes to the info of the current dive when quitting

As the application shuts down we do one more check to see if the dive that
is currently being displayed has been modified (we previously just checked
as we switch dives)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2011-09-21 07:34:00 -07:00
parent 189bec0c6b
commit 7a8fe91690

View file

@ -163,6 +163,9 @@ static void ask_save_changes()
void on_destroy(GtkWidget* w, gpointer data)
{
/* Make sure to flush any modified dive data */
update_dive(NULL);
if (unsaved_changes())
ask_save_changes();
gtk_main_quit();