mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
a85d4a6447
commit
80df7dd441
2 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue