diff options
author | 2018-07-12 11:57:21 +0200 | |
---|---|---|
committer | 2018-08-11 11:19:07 -0700 | |
commit | 80df7dd4419549685cab356b35e498f867685b0f (patch) | |
tree | d2d0aa6cdf06978e7088398e8d507f2c188dcedf /core/subsurface-qt/DiveObjectHelper.cpp | |
parent | a85d4a6447460ee796380620721493853a23d44b (diff) | |
download | subsurface-80df7dd4419549685cab356b35e498f867685b0f.tar.gz |
Mobile: return all used cylinders as a list
Planning ahead for full edit capabilities of dives that uses multiple cylinders.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.cpp')
-rw-r--r-- | core/subsurface-qt/DiveObjectHelper.cpp | 8 |
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; } |