mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 19:23:24 +00:00
Take dive's temperature into account for min/max temp
Generally we have the water temperature under divecomputer tag, but it might only be available one level up (under the dive tag). Thus we should take this into account in order to show the yearly/monthly statistics properly. Fixes #867 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
937796bce9
commit
2f89a2e6e2
1 changed files with 7 additions and 0 deletions
7
dive.c
7
dive.c
|
@ -1382,6 +1382,13 @@ struct dive *fixup_dive(struct dive *dive)
|
|||
sanitize_cylinder_info(dive);
|
||||
dive->maxcns = dive->cns;
|
||||
|
||||
/*
|
||||
* Use the dive's temperatures for minimum and maximum in case
|
||||
* we do not have temperatures recorded by DC.
|
||||
*/
|
||||
|
||||
update_min_max_temperatures(dive, dive->watertemp);
|
||||
|
||||
for_each_dc (dive, dc)
|
||||
fixup_dive_dc(dive, dc);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue