summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 1c7621e10..aca6ae62f 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -218,8 +218,12 @@ QString DiveObjectHelper::weightList() const
QStringList DiveObjectHelper::weights() const
{
QStringList weights;
- for (int i = 0; i < MAX_WEIGHTSYSTEMS; i++)
- weights << getFormattedWeight(m_dive, i);
+ for (int i = 0; i < MAX_WEIGHTSYSTEMS; i++) {
+ QString w = getFormattedWeight(m_dive, i);
+ if (w == EMPTY_DIVE_STRING)
+ continue;
+ weights << w;
+ }
return weights;
}