summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/diveplannermodel.cpp1
-rw-r--r--qt-models/diveplannermodel.h1
-rw-r--r--qt-models/diveplotdatamodel.cpp3
3 files changed, 4 insertions, 1 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 153771c08..96b5b9c0a 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -924,6 +924,7 @@ void DivePlannerPointsModel::createTemporaryPlan()
struct deco_state plan_deco_state;
plan(&plan_deco_state, &diveplan, &displayed_dive, DECOTIMESTEP, stoptable, &cache, isPlanner(), false);
//QtConcurrent::run(this, &DivePlannerPointsModel::computeVariations, &ds_after_previous_dives);
+ final_deco_state = plan_deco_state;
emit calculatedPlanNotes();
}
// throw away the cache
diff --git a/qt-models/diveplannermodel.h b/qt-models/diveplannermodel.h
index 0b714e608..5e04c9d79 100644
--- a/qt-models/diveplannermodel.h
+++ b/qt-models/diveplannermodel.h
@@ -56,6 +56,7 @@ public:
int lastEnteredPoint();
void removeDeco();
static bool addingDeco;
+ struct deco_state final_deco_state;
public
slots:
diff --git a/qt-models/diveplotdatamodel.cpp b/qt-models/diveplotdatamodel.cpp
index ac6cf7cd8..a893cb46b 100644
--- a/qt-models/diveplotdatamodel.cpp
+++ b/qt-models/diveplotdatamodel.cpp
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include "qt-models/diveplotdatamodel.h"
+#include "qt-models/diveplannermodel.h"
#include "core/dive.h"
#include "core/profile.h"
#include "core/divelist.h"
@@ -232,7 +233,7 @@ void DivePlotDataModel::calculateDecompression()
{
struct divecomputer *dc = select_dc(&displayed_dive);
init_decompression(&plot_deco_state, &displayed_dive);
- calculate_deco_information(&plot_deco_state, &displayed_dive, dc, &pInfo, false);
+ calculate_deco_information(&plot_deco_state, &(DivePlannerPointsModel::instance()->final_deco_state), &displayed_dive, dc, &pInfo, false);
dataChanged(index(0, CEILING), index(pInfo.nr - 1, TISSUE_16));
}
#endif