mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
f4820455e2
commit
d6c2236b8a
3 changed files with 65 additions and 3 deletions
2
dive.h
2
dive.h
|
|
@ -201,7 +201,7 @@ extern struct units input_units, output_units;
|
|||
extern int verbose;
|
||||
|
||||
struct dive_table {
|
||||
int nr, allocated;
|
||||
int nr, allocated, preexisting;
|
||||
struct dive **dives;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue