diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-10-06 16:30:57 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-07 17:50:51 +0300 |
commit | b61f6f66d8859e62023e3818879b90de529e9a72 (patch) | |
tree | 3f504976833a99d518886f0059ca6b28504b8c8b /desktop-widgets/tab-widgets/TabDiveStatistics.cpp | |
parent | 97991e2b9fff4254c2b40417bf6d7496ba0d849f (diff) | |
download | subsurface-b61f6f66d8859e62023e3818879b90de529e9a72.tar.gz |
Statistics: un-globalize stats_selection
The statistics of the selected dives were calculated
a) into a global objects and
b) at a completely different place than where they're used.
There's no plausible reason for either. There fore render
into a caller-provided structure at the place of use.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets/TabDiveStatistics.cpp')
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveStatistics.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp index 55f61eb5a..67e80ed24 100644 --- a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp +++ b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp @@ -44,6 +44,8 @@ void TabDiveStatistics::clear() void TabDiveStatistics::updateData() { + stats_t stats_selection; + calculate_stats_selected(&stats_selection); clear(); ui->depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, true)); if (amount_selected > 1) |