mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Planner copy salinity only if current dive exists
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
parent
0a1c559c15
commit
a94fba2439
1 changed files with 4 additions and 3 deletions
|
@ -979,11 +979,12 @@ void MainWindow::on_actionDivePlanner_triggered()
|
|||
DivePlannerPointsModel::instance()->setupStartTime();
|
||||
DivePlannerPointsModel::instance()->createSimpleDive();
|
||||
// plan the dive in the same mode as the currently selected one
|
||||
if (current_dive)
|
||||
if (current_dive) {
|
||||
divePlannerSettingsWidget()->setDiveMode(current_dive->dc.divemode);
|
||||
if (current_dive->salinity)
|
||||
divePlannerWidget()->setSalinity(current_dive->salinity);
|
||||
}
|
||||
DivePictureModel::instance()->updateDivePictures();
|
||||
if (current_dive->salinity)
|
||||
divePlannerWidget()->setSalinity(current_dive->salinity);
|
||||
divePlannerWidget()->setReplanButton(false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue