On 19 July 2016 at 02:33, Lubomir I. Ivanov <[email protected]> wrote:
> On 19 July 2016 at 02:06, Tim Wootton <[email protected]> wrote:
>> Signed-off-by: Tim Wootton <[email protected]>
>> ---
>>  core/subsurface-qt/DiveObjectHelper.cpp | 8 ++++++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/core/subsurface-qt/DiveObjectHelper.cpp 
>> b/core/subsurface-qt/DiveObjectHelper.cpp
>> index 1c7621e..c246a12 100644
>> --- a/core/subsurface-qt/DiveObjectHelper.cpp
>> +++ b/core/subsurface-qt/DiveObjectHelper.cpp
>> @@ -255,8 +255,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;
>>  }
>>
>
> you can also the fix for DiveObjectHelper::weights() in the same patch
> as it works the same way as DiveObjectHelper::cylinders().
>

also *add the fix.

lubomir
--
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to