diff options
author | Robert C. Helling <helling@atdotde.de> | 2019-01-29 14:27:27 +0100 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2019-02-05 14:18:14 +0100 |
commit | c9d8b4f605d55b99ec41ec1eaa008118889261c3 (patch) | |
tree | 5b279ab8ef3a4cf280701a975033625ef95b1b0d /core/profile.c | |
parent | 2eebbfa3a4ee692df3ba84ae01bf390a6b83e6de (diff) | |
download | subsurface-c9d8b4f605d55b99ec41ec1eaa008118889261c3.tar.gz |
Add button to toggle deco info in info box
The info box can get longish. Offer the user to turn
off display of deco information (surface GF and
individual ceilings).
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/profile.c')
-rw-r--r-- | core/profile.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/core/profile.c b/core/profile.c index e9a8b6fe9..b8c81e195 100644 --- a/core/profile.c +++ b/core/profile.c @@ -1504,17 +1504,19 @@ static void plot_string(struct plot_info *pi, struct plot_data *entry, struct me } if (entry->rbt) put_format_loc(b, translate("gettextFromC", "RBT: %umin\n"), DIV_UP(entry->rbt, 60)); - if (entry->surface_gf > 0) - put_format(b, translate("gettextFromC", "Surface GF %.0f%%\n"), entry->surface_gf); - if (entry->ceiling) { - depthvalue = get_depth_units(entry->ceiling, NULL, &depth_unit); - put_format_loc(b, translate("gettextFromC", "Calculated ceiling %.0f%s\n"), depthvalue, depth_unit); - if (prefs.calcalltissues) { - int k; - for (k = 0; k < 16; k++) { - if (entry->ceilings[k]) { - depthvalue = get_depth_units(entry->ceilings[k], NULL, &depth_unit); - put_format_loc(b, translate("gettextFromC", "Tissue %.0fmin: %.1f%s\n"), buehlmann_N2_t_halflife[k], depthvalue, depth_unit); + if (prefs.decoinfo) { + if (entry->surface_gf > 0) + put_format(b, translate("gettextFromC", "Surface GF %.0f%%\n"), entry->surface_gf); + if (entry->ceiling) { + depthvalue = get_depth_units(entry->ceiling, NULL, &depth_unit); + put_format_loc(b, translate("gettextFromC", "Calculated ceiling %.0f%s\n"), depthvalue, depth_unit); + if (prefs.calcalltissues) { + int k; + for (k = 0; k < 16; k++) { + if (entry->ceilings[k]) { + depthvalue = get_depth_units(entry->ceilings[k], NULL, &depth_unit); + put_format_loc(b, translate("gettextFromC", "Tissue %.0fmin: %.1f%s\n"), buehlmann_N2_t_halflife[k], depthvalue, depth_unit); + } } } } |