diff options
Diffstat (limited to 'desktop-widgets/simplewidgets.cpp')
-rw-r--r-- | desktop-widgets/simplewidgets.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index f6356f2d4..11af56bef 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -518,9 +518,9 @@ void DiveComponentSelection::buttonClicked(QAbstractButton *button) if (what->weights) { int w; text << tr("Weights:\n"); - for (w = 0; w < MAX_WEIGHTSYSTEMS; w++) { - if (displayed_dive.weightsystem[w].weight.grams) - text << displayed_dive.weightsystem[w].description << displayed_dive.weightsystem[w].weight.grams / 1000 << "kg\n"; + for (w = 0; w < displayed_dive.weightsystems.nr; w++) { + weightsystem_t ws = displayed_dive.weightsystems.weightsystems[w]; + text << ws.description << ws.weight.grams / 1000 << "kg\n"; } } clipboard->setText(cliptext); |