aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/diveplanner.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index f772a1c28..7be7263b8 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -449,13 +449,14 @@ void DivePlannerPointsModel::copyCylinders(dive *d)
QStringList& DivePlannerPointsModel::getGasList()
{
+ struct dive *activeDive = isPlanner() ? stagingDive : current_dive;
static QStringList list;
list.clear();
- if (!stagingDive) {
+ if (!activeDive) {
list.push_back(tr("AIR"));
} else {
for (int i = 0; i < MAX_CYLINDERS; i++) {
- cylinder_t *cyl = &stagingDive->cylinder[i];
+ cylinder_t *cyl = &activeDive->cylinder[i];
if (cylinder_nodata(cyl))
break;
list.push_back(gasToStr(cyl->gasmix.o2.permille, cyl->gasmix.he.permille));