aboutsummaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/DiveObjectHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.cpp')
-rw-r--r--core/subsurface-qt/DiveObjectHelper.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp
index 3f4649c42..35ec2df2a 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -352,10 +352,7 @@ int DiveObjectHelper::visibility() const
QString DiveObjectHelper::sumWeight() const
{
- weight_t sum = { 0 };
- for (int i = 0; i < MAX_WEIGHTSYSTEMS; i++){
- sum.grams += m_dive->weightsystem[i].weight.grams;
- }
+ weight_t sum = { total_weight(m_dive) };
return get_weight_string(sum, true);
}