]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Catch changes to the info of the current dive when quitting
authorDirk Hohndel <dirk@hohndel.org>
Wed, 21 Sep 2011 14:34:00 +0000 (07:34 -0700)
committerDirk Hohndel <dirk@hohndel.org>
Wed, 21 Sep 2011 18:29:13 +0000 (11:29 -0700)
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>
gtk-gui.c

index 71762f5354c9b0b84dcb52c72400bc17178f62ce..a34ac4fb283190bd8771b672c2c183074dfde060 100644 (file)
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -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();