Next step to using gasmix instead of o2/he

This changes the divedatapoints and functions that deal with them.

It changes plan_add_segment(), create_dp(), gasToStr(), and tankInUse() to
consume gasmix instead of o2/he.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-06-01 15:25:19 -07:00
parent 2bf46381a8
commit fe773241ee
5 changed files with 58 additions and 61 deletions

View file

@ -356,7 +356,7 @@ void CylindersModel::remove(const QModelIndex &index)
}
cylinder_t *cyl = &current->cylinder[index.row()];
if ((DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING &&
DivePlannerPointsModel::instance()->tankInUse(cyl->gasmix.o2.permille, cyl->gasmix.he.permille)) ||
DivePlannerPointsModel::instance()->tankInUse(cyl->gasmix)) ||
(DivePlannerPointsModel::instance()->currentMode() == DivePlannerPointsModel::NOTHING &&
(cyl->manually_added || (current_dive && cylinder_is_used(current_dive, cyl))))) {
QMessageBox::warning(MainWindow::instance(), TITLE_OR_TEXT(