Add units (m or ft) for MOD and MND in cylinder table in planner

We do display the unit for "Gas change at" today so we should also display it for MOD and MND.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
Stefan Fuchs 2017-03-11 10:37:43 +01:00 committed by Dirk Hohndel
parent ae9ab68096
commit b11af5a1ce

View file

@ -207,14 +207,14 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const
} else { } else {
pressure_t modpO2; pressure_t modpO2;
modpO2.mbar = prefs.bottompo2; modpO2.mbar = prefs.bottompo2;
ret = get_depth_string(gas_mod(&cyl->gasmix, modpO2, &displayed_dive, M_OR_FT(1,1))); ret = get_depth_string(gas_mod(&cyl->gasmix, modpO2, &displayed_dive, M_OR_FT(1,1)), true);
} }
break; break;
case MND: case MND:
if (cyl->bestmix_he) if (cyl->bestmix_he)
ret = QString("*"); ret = QString("*");
else else
ret = get_depth_string(gas_mnd(&cyl->gasmix, prefs.bestmixend, &displayed_dive, M_OR_FT(1,1))); ret = get_depth_string(gas_mnd(&cyl->gasmix, prefs.bestmixend, &displayed_dive, M_OR_FT(1,1)), true);
break; break;
case USE: case USE:
ret = gettextFromC::instance()->trGettext(cylinderuse_text[cyl->cylinder_use]); ret = gettextFromC::instance()->trGettext(cylinderuse_text[cyl->cylinder_use]);