From efd8da9b08eb1559f41e1eb8b287ff34ad9d5d4b Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Sun, 8 Jun 2014 18:20:18 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/diveeventitem.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'qt-ui/profile/diveeventitem.cpp') diff --git a/qt-ui/profile/diveeventitem.cpp b/qt-ui/profile/diveeventitem.cpp index 87b57bfab..0a468d084 100644 --- a/qt-ui/profile/diveeventitem.cpp +++ b/qt-ui/profile/diveeventitem.cpp @@ -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 { -- cgit v1.2.3-70-g09d2