diff options
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 aca6ae62f..69bd7999f 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -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; } |