summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 6831b9271..752f3ddf3 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -1114,7 +1114,8 @@ QString DiveItem::displayWeight() const
int kg = weight() / 1000;
str = QString("%1.%2").arg(kg).arg((unsigned)(gr) / 100);
} else {
- str = QString("%1").arg((unsigned)(grams_to_lbs(weight())));
+ double lbs = grams_to_lbs(weight());
+ str = QString("%1").arg(lbs, 0, 'f', lbs >= 40.0 ? 0 : 1 );
}
return str;