]> git.tdb.fi Git - ext/subsurface.git/commit
Automatically renumber new dives when they are "obvious".
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 Oct 2011 15:31:31 +0000 (08:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 Oct 2011 15:31:31 +0000 (08:31 -0700)
commitd6c2236b8a9e20d22d78de7432f7017a18235619
treeaa2c73f2afd72c0d49ffa585dc53d0e4748f4635
parentf4820455e2019c1a9deba7e90ed7f06111a4cb39
Automatically renumber new dives when they are "obvious".

When importing (or reading xml from files) new dives, we now renumber
them based on preexisting dive data, *if* such re-numbering is obvious.

NOTE! In order to be "obvious", there can be no overlap between old and
new dives: all the new dives have to come at the end.  That's what
happens with a normal libdivecomputer import, since we cut the import
short when we find a preexisting dive.

But if any of the new dives overlap the old dives in any way, or already
have been numbered separately, the automatic renumbering is not done,
and you need to do a manual renumber.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
dive.h
libdivecomputer.c
main.c