mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-11 03:21:29 +00:00
Mark new dives "downloaded" when importing new dives
We used to do this just for dive computer downloads, but we should do it for all imports, so that merging new import data always does the expected thing: any new dive computers will be added to the end of the list of preexisting dives, rather than the other way around. (Of course, if you set the "prefer downloaded" flag, that reverses this logic, and makes the newly imported dive computer data be the primary dive computer. That flag is currently only exported for dive computer downloads, not for imports). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
818542eeca
commit
a8fbd3d283
1 changed files with 3 additions and 0 deletions
|
@ -912,6 +912,9 @@ void process_dives(bool is_imported, bool prefer_imported)
|
||||||
for (i = preexisting; i < dive_table.nr; i++)
|
for (i = preexisting; i < dive_table.nr; i++)
|
||||||
set_dc_nickname(dive_table.dives[i]);
|
set_dc_nickname(dive_table.dives[i]);
|
||||||
|
|
||||||
|
for (i = preexisting; i < dive_table.nr; i++)
|
||||||
|
dive_table.dives[i]->downloaded = true;
|
||||||
|
|
||||||
/* This does the right thing for -1: NULL */
|
/* This does the right thing for -1: NULL */
|
||||||
last = get_dive(preexisting - 1);
|
last = get_dive(preexisting - 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue