mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Don't display a water temperature of absolute 0 in info/stats page
Found using the new test dives Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ef7771ebf2
commit
0e64a22c14
1 changed files with 5 additions and 2 deletions
|
@ -140,8 +140,11 @@ void show_dive_stats(struct dive *dive)
|
|||
set_label(info_stat_w.max_depth, "%.*f %s", decimals, value, unit);
|
||||
value = get_depth_units(dive->meandepth.mm, &decimals, &unit);
|
||||
set_label(info_stat_w.avg_depth, "%.*f %s", decimals, value, unit);
|
||||
value = get_temp_units(dive->watertemp.mkelvin, &unit);
|
||||
set_label(info_stat_w.water_temp, "%.1f %s", value, unit);
|
||||
if (dive->watertemp.mkelvin > 200) {
|
||||
value = get_temp_units(dive->watertemp.mkelvin, &unit);
|
||||
set_label(info_stat_w.water_temp, "%.1f %s", value, unit);
|
||||
} else
|
||||
set_label(info_stat_w.water_temp, "");
|
||||
value = get_volume_units(dive->sac, &decimals, &unit);
|
||||
if (value > 0) {
|
||||
set_label(info_stat_w.sac, "%.*f %s/min", decimals, value, unit);
|
||||
|
|
Loading…
Add table
Reference in a new issue