mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Planner: set up a cylinder, even if no current dive is selected
If there was no current dive we didn't set up any cylinder at all which was a bit awkward as we use AIR but have no cylinder corresponding to it, which breaks assumptions elsewhere. Instead we use either the default cylinder or make one up. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5afabfc9eb
commit
412317c91f
3 changed files with 27 additions and 10 deletions
|
|
@ -420,10 +420,7 @@ void MainWindow::on_actionDivePlanner_triggered()
|
|||
DivePlannerPointsModel::instance()->clear();
|
||||
|
||||
// setup the staging dive cylinders from the selected dive
|
||||
if (current_dive) {
|
||||
DivePlannerPointsModel::instance()->copyCylindersFrom(current_dive);
|
||||
CylindersModel::instance()->copyFromDive(current_dive);
|
||||
}
|
||||
DivePlannerPointsModel::instance()->setupCylinders();
|
||||
|
||||
// create a simple starting dive, using the first gas from the just copied cylidners
|
||||
createFakeDiveForAddAndPlan();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue