mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Merge dive tags when merging dives
.. otherwise the dive tags generally end up cleared when you download a duplicate dive from another dive computer. This uses MERGE_NONZERO, which means that if one of the dives has tags set, we'll prefer those tags. If both dives have tags set, we take the tags from the first ("preferred") dive. We could do a "just or all the bits together" too. But this way we at least take a set of tags that are consistent (ie we don't get both "boat" and "shore" set unless one of the original dives already had that inconsistency) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3fa6d981b0
commit
c17e15d315
1 changed files with 1 additions and 0 deletions
1
dive.c
1
dive.c
|
@ -1801,6 +1801,7 @@ struct dive *merge_dives(struct dive *a, struct dive *b, int offset, gboolean pr
|
|||
MERGE_MAX(res, a, b, number);
|
||||
MERGE_NONZERO(res, a, b, cns);
|
||||
MERGE_NONZERO(res, a, b, visibility);
|
||||
MERGE_NONZERO(res, a, b, dive_tags);
|
||||
merge_equipment(res, a, b);
|
||||
merge_airtemps(res, a, b);
|
||||
if (dl) {
|
||||
|
|
Loading…
Add table
Reference in a new issue