From 9aed18451a7731e4ebacad6be93882d09ba0ee1b Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Sun, 26 Feb 2023 17:32:14 +1300 Subject: [PATCH] Desktop: Fix planner for CCR dives with first segment on OC. Fix a bug that results in dive plans outside of the configured risk profile being produced when planning a CCR dive with the first segment set to open circuit. `d->dc.divemode` is already set in `setRebreatherMode`, which is sufficient, and congruent with the setting of other dive parameters, like `diveplan.gflow`. Signed-off-by: Michael Keller --- qt-models/diveplannermodel.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index fd6e0ebfc..0e2be8e0a 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -383,8 +383,6 @@ bool DivePlannerPointsModel::setData(const QModelIndex &index, const QVariant &v p.divemode = (enum divemode_t) value.toInt(); p.setpoint = p.divemode == CCR ? prefs.defaultsetpoint : 0; } - if (index.row() == 0) - d->dc.divemode = (enum divemode_t) value.toInt(); break; } editStop(index.row(), p);