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 <[email protected]> --- dive.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dive.c b/dive.c index 2fdedb1..1810109 100644 --- a/dive.c +++ b/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); -- 2.1.4 _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
