mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
58d7948871
commit
82aac4efff
4 changed files with 73 additions and 71 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue