mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Use the correct dive to create the gas list
If we are adding a dive, it's the stagingDive, otherwise it's the current_dive that we need to look at. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c1f936f288
commit
28ad26e878
1 changed files with 3 additions and 2 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue