Always show manually added gaschanges in notes

In the manually entered part, we dont wait until the next stop.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2017-02-08 21:55:09 +01:00 committed by Dirk Hohndel
parent fef07750ac
commit 057419fa85

View file

@ -734,7 +734,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
/* Normally a gas change is displayed on the stopping segment, so only display a gas change at the end of
* an ascent segment if it is not followed by a stop
*/
if (isascent && gaschange_after && dp->next && nextdp && dp->depth != nextdp->depth) {
if ((isascent || dp->entered) && gaschange_after && dp->next && nextdp && (dp->depth != nextdp->depth || nextdp->entered)) {
if (dp->setpoint) {
snprintf(temp, sz_temp, translate("gettextFromC", "(SP = %.1fbar)"), (double) nextdp->setpoint / 1000.0);
len += snprintf(buffer + len, sz_buffer - len, "<td style='padding-left: 10px; color: red; float: left;'><b>%s %s</b></td>", gasname(&newgasmix),