It is better to use the proper function to test if cylinder is in use
than just checking the description.

Signed-off-by: Miika Turkia <[email protected]>
---
 subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp 
b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
index 38ffffb..9a6f318 100644
--- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
+++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
@@ -272,7 +272,7 @@ QString DiveObjectHelper::sumWeight() const
 QString DiveObjectHelper::getCylinder() const
 {
        QString getCylinder;
-       if (m_dive->cylinder[1].type.description != NULL){
+       if (is_cylinder_used(m_dive, 1)){
                getCylinder = QObject::tr("Multiple");
        }
        else {
-- 
2.5.0

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

Reply via email to