aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models/diveplotdatamodel.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2017-11-22 20:42:33 +0100
committerGravatar Robert C. Helling <helling@atdotde.de>2017-11-25 20:13:01 +0100
commit8e21a65653514d9340ef45c9b9c53dfe5d280350 (patch)
tree2ada40567e25bc45035698748f368127b1cca199 /qt-models/diveplotdatamodel.cpp
parenta9ceecc2e3646432d6688d04b592c48f9c63ae65 (diff)
downloadsubsurface-8e21a65653514d9340ef45c9b9c53dfe5d280350.tar.gz
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>
Diffstat (limited to 'qt-models/diveplotdatamodel.cpp')
-rw-r--r--qt-models/diveplotdatamodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-models/diveplotdatamodel.cpp b/qt-models/diveplotdatamodel.cpp
index 8cabd833e..ac6cf7cd8 100644
--- a/qt-models/diveplotdatamodel.cpp
+++ b/qt-models/diveplotdatamodel.cpp
@@ -231,8 +231,8 @@ void DivePlotDataModel::emitDataChanged()
void DivePlotDataModel::calculateDecompression()
{
struct divecomputer *dc = select_dc(&displayed_dive);
- init_decompression(&displayed_dive);
- calculate_deco_information(&displayed_dive, dc, &pInfo, false);
+ init_decompression(&plot_deco_state, &displayed_dive);
+ calculate_deco_information(&plot_deco_state, &displayed_dive, dc, &pInfo, false);
dataChanged(index(0, CEILING), index(pInfo.nr - 1, TISSUE_16));
}
#endif