summaryrefslogtreecommitdiffstats
path: root/subsurface-core
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2016-02-14 17:14:09 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-14 12:37:30 -0800
commit8c38dbf3b7334983c0810a967b98cd35c1a0cfb0 (patch)
treea5a70ec4874b146bf15e0dbb4031e7f8b44b8385 /subsurface-core
parentc97ed010c7f3f8f8615dba8be9d595a335eddc36 (diff)
downloadsubsurface-8c38dbf3b7334983c0810a967b98cd35c1a0cfb0.tar.gz
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 <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core')
-rw-r--r--subsurface-core/subsurface-qt/DiveObjectHelper.cpp2
1 files changed, 1 insertions, 1 deletions
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 {