From 8c38dbf3b7334983c0810a967b98cd35c1a0cfb0 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 14 Feb 2016 17:14:09 +0200 Subject: [PATCH] Test cylinder usage properly 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 Signed-off-by: Dirk Hohndel --- 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 38ffffb67..9a6f31818 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 {