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>
This commit is contained in:
Dirk Hohndel 2012-09-10 14:44:48 -07:00
parent 3b907d8479
commit b4d55c8b59

4
main.c
View file

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