summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Joakim Bygdell <j.bygdell@gmail.com>2015-04-05 14:17:26 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-05 07:40:54 -0700
commit352433723dc98269a4b206072b7fd18d6dba436e (patch)
treeabb35b691f87b2354959a9cb354763a99dee552a /planner.c
parentf8a808bcaf8cf18ae6892e1e680006fc3f702d09 (diff)
downloadsubsurface-352433723dc98269a4b206072b7fd18d6dba436e.tar.gz
Read stored planner prefs when starting.
Back in 5bf23381e we started storing planner settings in prefs. We need to read those settings back when we start the planner. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/planner.c b/planner.c
index 11bf2a5f8..e80375ca8 100644
--- a/planner.c
+++ b/planner.c
@@ -881,6 +881,17 @@ int plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool s
diveplan->surface_pressure = SURFACE_PRESSURE;
create_dive_from_plan(diveplan, is_planner);
+ if (prefs.verbatim_plan)
+ plan_verbatim = true;
+ if (prefs.display_runtime)
+ plan_display_runtime = true;
+ if (prefs.display_duration)
+ plan_display_duration = true;
+ if (prefs.display_transitions)
+ plan_display_transitions = true;
+ if (prefs.last_stop)
+ decostoplevels[1] = 6000;
+
/* Let's start at the last 'sample', i.e. the last manually entered waypoint. */
sample = &displayed_dive.dc.sample[displayed_dive.dc.samples - 1];