diff options
author | Robert C. Helling <helling@atdotde.de> | 2017-09-18 16:10:47 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-09-20 08:54:41 -0700 |
commit | a6f186279fcce9631623b94bfdc00fa3fd071b4c (patch) | |
tree | 22e907959336c94887f210da14f7fc5c54496b6d /core/plannernotes.c | |
parent | 5e9bdce195c1ec3ca077ce75cf2c0a221d6029de (diff) | |
download | subsurface-a6f186279fcce9631623b94bfdc00fa3fd071b4c.tar.gz |
Add a checkbox to turn off plan variations
... as those come with a performance penalty
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/plannernotes.c')
-rw-r--r-- | core/plannernotes.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/plannernotes.c b/core/plannernotes.c index 414236a1e..68c9bae25 100644 --- a/core/plannernotes.c +++ b/core/plannernotes.c @@ -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>", |