summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-06-08 18:20:18 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-08 09:25:27 -0700
commitefd8da9b08eb1559f41e1eb8b287ff34ad9d5d4b (patch)
treebd68ee1000609d11f7d24598dc16e6caa9b3af87 /qt-ui/profile
parentbd3dd30518085429a397e3e647c1d1950e3a8cbd (diff)
downloadsubsurface-efd8da9b08eb1559f41e1eb8b287ff34ad9d5d4b.tar.gz
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>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/diveeventitem.cpp10
1 files changed, 1 insertions, 9 deletions
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 {