Add a checkbox to turn off plan variations

... as those come with a performance penalty

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2017-09-18 16:10:47 +02:00 committed by Dirk Hohndel
parent 5e9bdce195
commit a6f186279f
10 changed files with 117 additions and 59 deletions

View file

@ -101,8 +101,13 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
get_current_date());
}
len += snprintf(buffer + len, sz_buffer - len, translate("gettextFromC", "Runtime: %dmin VARIATIONS<br></div>"),
diveplan_duration(diveplan));
if (prefs.display_variations)
len += snprintf(buffer + len, sz_buffer - len, translate("gettextFromC", "Runtime: %dmin VARIATIONS<br></div>"),
diveplan_duration(diveplan));
else
len += snprintf(buffer + len, sz_buffer - len, translate("gettextFromC", "Runtime: %dmin<br></div>"),
diveplan_duration(diveplan));
if (!plan_verbatim) {
len += snprintf(buffer + len, sz_buffer - len, "<table><thead><tr><th></th><th>%s</th>",