Planner: make cylinder-model subobject of planner-model

The cylinder-model had an instance() function, but actually
there were two cylinder models: one used by the equipment tab,
one used by the planner.

This is misleading. Therefore, remove the instance() function
and make the cylinder-model a subobject of the planner-model.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-02-03 18:52:17 +01:00 committed by Dirk Hohndel
parent 6622f42aab
commit 190a2a876e
7 changed files with 39 additions and 38 deletions

View file

@ -918,7 +918,7 @@ void MainWindow::on_actionReplanDive_triggered()
divePlannerWidget->setSalinity(current_dive->salinity);
DivePlannerPointsModel::instance()->loadFromDive(current_dive);
reset_cylinders(&displayed_dive, true);
CylindersModelFiltered::instance()->updateDive();
DivePlannerPointsModel::instance()->cylindersModel()->updateDive();
}
void MainWindow::on_actionDivePlanner_triggered()