mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Do not merge dives with zero duration
As these are probably manually entered dives with incomplete data, it is better not to merge them. See #561 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
25fc72e22f
commit
5b5cab2905
1 changed files with 1 additions and 0 deletions
|
@ -2645,6 +2645,7 @@ static int likely_same_dive(struct dive *a, struct dive *b)
|
|||
*/
|
||||
if (!similar(a->maxdepth.mm, b->maxdepth.mm, 1000) ||
|
||||
(a->meandepth.mm && b->meandepth.mm && !similar(a->meandepth.mm, b->meandepth.mm, 1000)) ||
|
||||
!a->duration.seconds || !b->duration.seconds ||
|
||||
!similar(a->duration.seconds, b->duration.seconds, 5 * 60))
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue