1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

Gas was printed in permille, use gasname instead

After the switch to a central event decoder and just return gasmix from
that we printed things in permille, eg. EAN1000 and 180/550 which looks
kinda strange.
This fixes that by using gasname instead to give the gas a name.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-06-08 18:20:18 +02:00 committed by Dirk Hohndel
parent bd3dd30518
commit efd8da9b08

View file

@ -83,16 +83,8 @@ void DiveEventItem::setupToolTipString()
if (value) {
if (type == SAMPLE_EVENT_GASCHANGE || type == SAMPLE_EVENT_GASCHANGE2) {
struct gasmix *g = get_gasmix_from_event(internalEvent);
int he = get_he(g);
int o2 = get_o2(g);
name += ": ";
if (he)
name += QString("%1/%2").arg(o2).arg(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);
name += gasname(g);
} else if (type == SAMPLE_EVENT_PO2 && name == "SP change") {
name += QString(":%1").arg((double)value / 1000);
} else {