aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/diveplanner.cpp8
-rw-r--r--qt-ui/diveplanner.h2
-rw-r--r--qt-ui/mainwindow.cpp2
3 files changed, 7 insertions, 5 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)
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index 4aa5f0094..781d7c741 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -39,7 +39,7 @@ public:
void removeSelectedPoints(const QVector<int> &rows);
void setPlanMode(Mode mode);
bool isPlanner();
- void createSimpleDive();
+ void createSimpleDive(bool planner = false);
void clear();
Mode currentMode() const;
bool setRecalc(bool recalc);
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index ac02527cb..63abd1d30 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -411,7 +411,7 @@ void MainWindow::on_actionDivePlanner_triggered()
ui.newProfile->setPlanState();
ui.infoPane->setCurrentIndex(PLANNERWIDGET);
DivePlannerPointsModel::instance()->clear();
- DivePlannerPointsModel::instance()->createSimpleDive();
+ DivePlannerPointsModel::instance()->createSimpleDive(true);
ui.ListWidget->reload(DiveTripModel::CURRENT);
}