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>
This commit is contained in:
Miika Turkia 2016-02-14 17:14:09 +02:00 committed by Dirk Hohndel
parent c97ed010c7
commit 8c38dbf3b7

View file

@ -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 {