Initialise cylinder start pressure with working pressure

In the planner, this is the natural assumption.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2018-01-25 11:25:47 +01:00
parent a07b6b4d97
commit 6d3c2327bd
2 changed files with 2 additions and 0 deletions

View file

@ -447,6 +447,7 @@ void CylindersModel::add()
int row = rows; int row = rows;
fill_default_cylinder(&displayed_dive.cylinder[row]); 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; displayed_dive.cylinder[row].manually_added = true;
beginInsertRows(QModelIndex(), row, row); beginInsertRows(QModelIndex(), row, row);
rows++; rows++;

View file

@ -156,6 +156,7 @@ void DivePlannerPointsModel::setupCylinders()
} }
if (!empty_string(prefs.default_cylinder)) { if (!empty_string(prefs.default_cylinder)) {
fill_default_cylinder(&displayed_dive.cylinder[0]); 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])) { if (cylinder_none(&displayed_dive.cylinder[0])) {
// roughly an AL80 // roughly an AL80