Fix test for "air" in tooltip display of gaschange

The "is_air()" test works when we have the gases in permille, but not in
percent. In that case we can just check for He == 0 and O2 == 21.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-04-29 22:39:33 -07:00
parent bcdd6192fe
commit 0e49e61ddc

View file

@ -88,7 +88,7 @@ void DiveEventItem::setupToolTipString()
name += ": ";
if (he)
name += QString("%1/%2").arg(o2).arg(he);
else if (is_air(o2, he))
else if (o2 == 21) // don't use is_air() as that assumes permille
name += tr("air");
else
name += QString(tr("EAN%1")).arg(o2);