summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2018-02-24 20:07:11 +0100
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-02-25 02:04:30 +0200
commitd9c0df01424268ca7ba568279f08683f2c98aa44 (patch)
tree63ea5ecc62c31aca5f528edc0576fa7a2e169f4a
parentb5b5d619be023b5c8718f3ea266a159493627e9a (diff)
downloadsubsurface-d9c0df01424268ca7ba568279f08683f2c98aa44.tar.gz
Correctly suppress display of ICD table if prefs.show_icd is false
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
-rw-r--r--core/plannernotes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/plannernotes.c b/core/plannernotes.c
index 9cae66c5b..863df5f79 100644
--- a/core/plannernotes.c
+++ b/core/plannernotes.c
@@ -540,7 +540,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
}
/* For trimix OC dives, if an icd table header and icd data were printed to buffer, then add the ICD table here */
- if (!icdtableheader) {
+ if (!icdtableheader && prefs.show_icd) {
icdlen += snprintf(icdbuffer + icdlen, sz_icdbuf - icdlen,"</tbody></table>"); // End the ICD table
len += snprintf(buffer + len, sz_buffer - len, "%s", icdbuffer); // ..and add it to the html buffer
if (icdwarning) { // If necessary, add warning