mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Only add non-blank weights to the weight 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
b66b387215
commit
e34bf95718
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue