summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-10 14:44:48 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-10 14:44:48 -0700
commitb4d55c8b598b648acda0f8107868b8753283c72e (patch)
tree54c3f64681c2b074cffd6f66e405eaff2aa8b780 /main.c
parent3b907d8479fcee553d3601da62ecae1d90d201f8 (diff)
downloadsubsurface-b4d55c8b598b648acda0f8107868b8753283c72e.tar.gz
Change the definition of "dive table changed"
We only ask to save changes if the dive table was changed. Yet we didn't consider the dive table changed if it was initially empty. So starting with an empty file and making changes we were quitting without saving. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index 01306b1bf..46e22041d 100644
--- a/main.c
+++ b/main.c
@@ -140,8 +140,8 @@ void report_dives(gboolean is_imported)
if (last && last->number)
try_to_renumber(last, preexisting);
- /* did we have dives in the table and added more? */
- if (last && preexisting != dive_table.nr)
+ /* did we add dives to the dive table? */
+ if (preexisting != dive_table.nr)
mark_divelist_changed(TRUE);
}
dive_table.preexisting = dive_table.nr;