mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Localize global planner state
For UI responsiveness, we need to be able to run the planner in the background. This needs the planner state to be localized (and we need to pass a pointer around). In order to not let too many lines overrun (and to save typing in the future) I have renamed instances of struct deco_state to ds. Yes this should have gone to a separate commit but I accidentally commit --amend'ed it. Computing of planner variations is temporarily disabled. Unlock the planner when returning early So we don't deadlock in add dive and recreational mode (which use the planner without actually planning). Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
a9ceecc2e3
commit
8e21a65653
14 changed files with 298 additions and 286 deletions
|
|
@ -115,7 +115,7 @@ private:
|
|||
void createPlan(bool replanCopy);
|
||||
struct diveplan diveplan;
|
||||
struct divedatapoint *cloneDiveplan(struct diveplan *plan_copy);
|
||||
void computeVariations();
|
||||
void computeVariations(struct deco_state *ds);
|
||||
int analyzeVariations(struct decostop *min, struct decostop *mid, struct decostop *max, const char *unit);
|
||||
Mode mode;
|
||||
bool recalc;
|
||||
|
|
@ -124,6 +124,7 @@ private:
|
|||
int tempGFHigh;
|
||||
int tempGFLow;
|
||||
int instanceCounter = 0;
|
||||
struct deco_state ds_after_previous_dives;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue