[PATCH] Test cylinder usage properly
Miika Turkia
miika.turkia at gmail.com
Sun Feb 14 07:14:09 PST 2016
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 <miika.turkia at gmail.com>
---
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
More information about the subsurface
mailing list