mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Preserve dive mode when planning a dive
Data such as cilinders and used gasses are populated fromn the currently selected dive when starting the planner. It is more logical to use the dive mode (OC, CCR, pSCR) of the currently selected dive as well. This commits changes this. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
9b8fc9f64a
commit
89b914e47d
3 changed files with 9 additions and 0 deletions
|
|
@ -908,6 +908,7 @@ void MainWindow::setupForAddAndPlan(const char *model)
|
|||
// setup the dive cylinders
|
||||
DivePlannerPointsModel::instance()->clear();
|
||||
DivePlannerPointsModel::instance()->setupCylinders();
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::on_actionReplanDive_triggered()
|
||||
|
|
@ -951,6 +952,8 @@ void MainWindow::on_actionDivePlanner_triggered()
|
|||
setupForAddAndPlan("planned dive"); // don't translate, stored in XML file
|
||||
DivePlannerPointsModel::instance()->setupStartTime();
|
||||
DivePlannerPointsModel::instance()->createSimpleDive();
|
||||
// plan the dive in the same mode as the currently selected one
|
||||
divePlannerSettingsWidget()->setDiveMode(current_dive->dc.divemode);
|
||||
DivePictureModel::instance()->updateDivePictures();
|
||||
divePlannerWidget()->setReplanButton(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue