summaryrefslogtreecommitdiffstats
path: root/qt-models/diveplannermodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r--qt-models/diveplannermodel.cpp31
1 files changed, 7 insertions, 24 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 167b8f740..5e8f330c7 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -404,9 +404,7 @@ int DivePlannerPointsModel::rowCount(const QModelIndex &parent) const
DivePlannerPointsModel::DivePlannerPointsModel(QObject *parent) : QAbstractTableModel(parent),
mode(NOTHING),
- recalc(false),
- tempGFHigh(100),
- tempGFLow(100)
+ recalc(false)
{
memset(&diveplan, 0, sizeof(diveplan));
startTime.setTimeSpec(Qt::UTC);
@@ -455,25 +453,18 @@ void DivePlannerPointsModel::setProblemSolvingTime(int minutes)
void DivePlannerPointsModel::setGFHigh(const int gfhigh)
{
- tempGFHigh = gfhigh;
- // GFHigh <= 34 can cause infinite deco at 6m - don't trigger a recalculation
- // for smaller GFHigh unless the user explicitly leaves the field
- if (tempGFHigh > 34)
- triggerGFHigh();
-}
-
-void DivePlannerPointsModel::triggerGFHigh()
-{
- if (diveplan.gfhigh != tempGFHigh) {
- diveplan.gfhigh = tempGFHigh;
+ if (diveplan.gfhigh != gfhigh) {
+ diveplan.gfhigh = gfhigh;
emitDataChanged();
}
}
void DivePlannerPointsModel::setGFLow(const int gflow)
{
- tempGFLow = gflow;
- triggerGFLow();
+ if (diveplan.gflow != gflow) {
+ diveplan.gflow = gflow;
+ emitDataChanged();
+ }
}
void DivePlannerPointsModel::setRebreatherMode(int mode)
@@ -485,14 +476,6 @@ void DivePlannerPointsModel::setRebreatherMode(int mode)
emitDataChanged();
}
-void DivePlannerPointsModel::triggerGFLow()
-{
- if (diveplan.gflow != tempGFLow) {
- diveplan.gflow = tempGFLow;
- emitDataChanged();
- }
-}
-
void DivePlannerPointsModel::setVpmbConservatism(int level)
{
if (diveplan.vpmb_conservatism != level) {