Previously a gas change would be shown one stop too late in the planner notes table if the 'display transitions in deco' option was not selected, and the gas change would be shown one segment too early if that option was selected.
This patch corrects the logic. Can someone more familiar with the planner code check that I've done the correct thing? It works for me. I reported this bug yesterday, but didn't realize then that it was doing the wrong thing if the 'display transitions' option is selected. http://lists.subsurface-divelog.org/pipermail/subsurface/2015-June/019652.html Note that despite the number in the filename, this isn't the second in a patch series - I just a newb with git. I will try to send another patch to put the duration column before the runtime column. Rick
From add06b748f1523b146e49135082107a960aeca20 Mon Sep 17 00:00:00 2001 From: Rick Walsh <[email protected]> Date: Tue, 16 Jun 2015 20:55:48 +1000 Subject: [PATCH 2/2] Fix planner notes gas change output logic Previously a gas change would be shown one stop too late in the planner notes table if the 'display transitions in deco' option was not selected, and the gas change would be shown one segment too early if that option was selected. This patch corrects the logic Signed-off-by: Rick Walsh <[email protected]> --- planner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planner.c b/planner.c index c8578c3..8ac66e5 100644 --- a/planner.c +++ b/planner.c @@ -650,7 +650,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool } if (gaschange) { - if(dp->depth == lastdepth && !postponed) { + if(dp->depth != lastdepth && plan_display_transitions && !postponed) { postponed = true; } else { if (dp->setpoint) { -- 2.4.3
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
