summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/diveplannermodel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index f7570fd55..c3996d077 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -481,7 +481,10 @@ void DivePlannerPointsModel::setSafetyStop(bool value)
void DivePlannerPointsModel::setReserveGas(int reserve)
{
- prefs.reserve_gas = reserve * 1000;
+ if (prefs.units.pressure == units::BAR)
+ prefs.reserve_gas = reserve * 1000;
+ else
+ prefs.reserve_gas = psi_to_mbar(reserve);
emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1));
}