aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2017-08-23 22:43:33 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-08-29 06:49:44 -0700
commit82aac4efff7e0836e879e52b4e4e0f7301b165a9 (patch)
treef5f053d47bbd804c6545c668ee433c290b47f87f /qt-models
parent58d79488714ff7773916f3efe0970c424c8bd1cd (diff)
downloadsubsurface-82aac4efff7e0836e879e52b4e4e0f7301b165a9.tar.gz
Make plan take dive and decotimestep as arguments
...rather than use a global variable and a macro. This should be a no-op in preparation to allow planning several versions of a dive. Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/diveplannermodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 54a5ce7b6..a997c08a1 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -842,7 +842,7 @@ void DivePlannerPointsModel::createTemporaryPlan()
dump_plan(&diveplan);
#endif
if (recalcQ() && !diveplan_empty(&diveplan)) {
- plan(&diveplan, &cache, isPlanner(), false);
+ plan(&diveplan, &displayed_dive, DECOTIMESTEP, &cache, isPlanner(), false);
emit calculatedPlanNotes();
}
// throw away the cache
@@ -878,7 +878,7 @@ void DivePlannerPointsModel::createPlan(bool replanCopy)
setRecalc(oldRecalc);
//TODO: C-based function here?
- plan(&diveplan, &cache, isPlanner(), true);
+ plan(&diveplan, &displayed_dive, DECOTIMESTEP, &cache, isPlanner(), true);
free(cache);
if (!current_dive || displayed_dive.id != current_dive->id) {
// we were planning a new dive, not re-planning an existing on