From 08d2ceb66bf40640b83cbfe1dc278c698ceb92b6 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 3 Jan 2015 17:21:05 -0800 Subject: Extend SAMPLE_EVENT_GASCHANGE2 to have cylinder index in 'flags' field A value of zero (which is the normal legacy one) remains "unknown", but the divecomputer backend can now give both gasmix and cylinder number this way. Currently only the EON Steel backend does that, but it should be easy enough to extend others too. Also, fix the user-visible cylinder numbering in the cylinder change tooltip to use a human-friendlier one-based numbering (ie first cylinder is "cyl 1", not "cyl 0") Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- qt-ui/profile/diveeventitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/profile/diveeventitem.cpp b/qt-ui/profile/diveeventitem.cpp index 4294dfb29..1a5e29dda 100644 --- a/qt-ui/profile/diveeventitem.cpp +++ b/qt-ui/profile/diveeventitem.cpp @@ -106,7 +106,7 @@ void DiveEventItem::setupToolTipString() /* Do we have an explicit cylinder index? Show it. */ if (internalEvent->gas.index >= 0) - name += QString(" (cyl %1)").arg(internalEvent->gas.index); + name += QString(" (cyl %1)").arg(internalEvent->gas.index+1); } else if (type == SAMPLE_EVENT_PO2 && name == "SP change") { name += QString(":%1").arg((double)value / 1000); } else { -- cgit v1.2.3-70-g09d2