diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-05-25 15:28:55 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-26 13:19:35 -0700 |
commit | 660235c9b7cc719f3ba11c2eecceec18fab3cb54 (patch) | |
tree | be7d565af290caa0ce3503fab05c353952a3fda2 /qt-ui/diveplanner.cpp | |
parent | eec0b327a3bb5f2d27594693d79a5bc86439c1e2 (diff) | |
download | subsurface-660235c9b7cc719f3ba11c2eecceec18fab3cb54.tar.gz |
Planner: Don't include the ascent in the default dive
Allow to both create the full default dive or ownly the descent and bottom
part (so the planner can deal with the ascent).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 4fff79666..a7f97ebe2 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -59,13 +59,15 @@ void DivePlannerPointsModel::removeSelectedPoints(const QVector<int> &rows) endRemoveRows(); } -void DivePlannerPointsModel::createSimpleDive() +void DivePlannerPointsModel::createSimpleDive(bool planner) { // plannerModel->addStop(0, 0, O2_IN_AIR, 0, 0); plannerModel->addStop(M_OR_FT(15, 45), 1 * 60, O2_IN_AIR, 0, 0, true); plannerModel->addStop(M_OR_FT(15, 45), 40 * 60, O2_IN_AIR, 0, 0, true); - plannerModel->addStop(M_OR_FT(5, 15), 42 * 60, O2_IN_AIR, 0, 0, true); - plannerModel->addStop(M_OR_FT(5, 15), 45 * 60, O2_IN_AIR, 0, 0, true); + if (!planner) { + plannerModel->addStop(M_OR_FT(5, 15), 42 * 60, O2_IN_AIR, 0, 0, true); + plannerModel->addStop(M_OR_FT(5, 15), 45 * 60, O2_IN_AIR, 0, 0, true); + } } void DivePlannerPointsModel::loadFromDive(dive *d) |