mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Only add non-blank cylinder strings to the cylinder list
Signed-off-by: Tim Wootton <tim@tee-jay.org.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b0ad1aa969
commit
0b5a1719a1
1 changed files with 6 additions and 2 deletions
|
@ -259,8 +259,12 @@ QString DiveObjectHelper::cylinderList() const
|
|||
QStringList DiveObjectHelper::cylinders() const
|
||||
{
|
||||
QStringList cylinders;
|
||||
for (int i = 0; i < MAX_CYLINDERS; i++)
|
||||
cylinders << getFormattedCylinder(m_dive, i);
|
||||
for (int i = 0; i < MAX_CYLINDERS; i++) {
|
||||
QString cyl = getFormattedCylinder(m_dive, i);
|
||||
if (cyl == EMPTY_DIVE_STRING)
|
||||
continue;
|
||||
cylinders << cyl;
|
||||
}
|
||||
return cylinders;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue