diff options
author | Robert C. Helling <helling@atdotde.de> | 2018-01-25 11:25:47 +0100 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2018-01-26 07:04:45 +0100 |
commit | 6d3c2327bd6a7bfdb283fe2e681aff2449327f89 (patch) | |
tree | 95dd73c658ad3772a11ea0b516336a7dc52613bc /qt-models | |
parent | a07b6b4d9714e32cb28b903bc89889853e30c410 (diff) | |
download | subsurface-6d3c2327bd6a7bfdb283fe2e681aff2449327f89.tar.gz |
Initialise cylinder start pressure with working pressure
In the planner, this is the natural assumption.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/cylindermodel.cpp | 1 | ||||
-rw-r--r-- | qt-models/diveplannermodel.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp index e46048222..5bb25f505 100644 --- a/qt-models/cylindermodel.cpp +++ b/qt-models/cylindermodel.cpp @@ -447,6 +447,7 @@ void CylindersModel::add() int row = rows; fill_default_cylinder(&displayed_dive.cylinder[row]); + displayed_dive.cylinder[row].start = displayed_dive.cylinder[row].type.workingpressure; displayed_dive.cylinder[row].manually_added = true; beginInsertRows(QModelIndex(), row, row); rows++; diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 924812e22..43ab20de3 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -156,6 +156,7 @@ void DivePlannerPointsModel::setupCylinders() } if (!empty_string(prefs.default_cylinder)) { fill_default_cylinder(&displayed_dive.cylinder[0]); + displayed_dive.cylinder[0].start = displayed_dive.cylinder[0].type.workingpressure; } if (cylinder_none(&displayed_dive.cylinder[0])) { // roughly an AL80 |