mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Change character for liter in SAC values as well
And fix the bug that in the info overlay SAC was always given in metric values. And try to reduce the number of places in which we calculate the unit conversions... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
11380a5deb
commit
bbe62f756a
3 changed files with 12 additions and 12 deletions
|
@ -1258,11 +1258,10 @@ QString DiveItem::displaySac() const
|
|||
{
|
||||
QString str;
|
||||
struct dive *dive = get_dive_by_uniq_id(diveId);
|
||||
if (get_units()->volume == units::LITER)
|
||||
str = QString::number(dive->sac / 1000.0, 'f', 1).append(tr(" l/min"));
|
||||
else
|
||||
str = QString::number(ml_to_cuft(dive->sac), 'f', 2).append(tr(" cuft/min"));
|
||||
return str;
|
||||
const char *unit;
|
||||
int decimal;
|
||||
double value = get_volume_units(dive->sac, &decimal, &unit);
|
||||
return QString::number(value, 'f', decimal).append(unit).append(tr("/min"));
|
||||
}
|
||||
|
||||
QString DiveItem::displayWeight() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue