summaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/DiveObjectHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.cpp')
-rw-r--r--core/subsurface-qt/DiveObjectHelper.cpp8
1 files changed, 6 insertions, 2 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;
}