summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/subsurface-qt/DiveObjectHelper.cpp8
-rw-r--r--core/subsurface-qt/DiveObjectHelper.h4
2 files changed, 8 insertions, 4 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp
index 4c5a30912..5ac144c07 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -395,9 +395,13 @@ QString DiveObjectHelper::sumWeight() const
return get_weight_string(sum, true);
}
-QString DiveObjectHelper::getCylinder() const
+QStringList DiveObjectHelper::getCylinder() const
{
- QString getCylinder = m_dive->cylinder[0].type.description;
+ QStringList getCylinder;
+ for (int i = 0; i < MAX_CYLINDERS; i++) {
+ if (is_cylinder_used(m_dive, i))
+ getCylinder << m_dive->cylinder[i].type.description;
+ }
return getCylinder;
}
diff --git a/core/subsurface-qt/DiveObjectHelper.h b/core/subsurface-qt/DiveObjectHelper.h
index 51efc5595..1c9228365 100644
--- a/core/subsurface-qt/DiveObjectHelper.h
+++ b/core/subsurface-qt/DiveObjectHelper.h
@@ -45,7 +45,7 @@ class DiveObjectHelper : public QObject {
Q_PROPERTY(int maxcns READ maxcns CONSTANT)
Q_PROPERTY(int otu READ otu CONSTANT)
Q_PROPERTY(QString sumWeight READ sumWeight CONSTANT)
- Q_PROPERTY(QString getCylinder READ getCylinder CONSTANT)
+ Q_PROPERTY(QStringList getCylinder READ getCylinder CONSTANT)
Q_PROPERTY(QString startPressure READ startPressure CONSTANT)
Q_PROPERTY(QString endPressure READ endPressure CONSTANT)
Q_PROPERTY(QString firstGas READ firstGas CONSTANT)
@@ -89,7 +89,7 @@ public:
int maxcns() const;
int otu() const;
QString sumWeight() const;
- QString getCylinder() const;
+ QStringList getCylinder() const;
QString startPressure() const;
QString endPressure() const;
QString firstGas() const;