diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-10-06 10:58:12 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-07 17:50:51 +0300 |
commit | 97991e2b9fff4254c2b40417bf6d7496ba0d849f (patch) | |
tree | a2b9af681e9ac5e72e4846736df001f75f7cc788 /desktop-widgets/tab-widgets | |
parent | 68fdc0b6f49c81cb61387b7d006807509280c9df (diff) | |
download | subsurface-97991e2b9fff4254c2b40417bf6d7496ba0d849f.tar.gz |
Statistics: remove global state / calculate only when needed
Statistics were calculated into global variables every time the
current dive was changed.
Calculate statistics only when needed and into a structure
provided by the caller.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets')
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index ffcb70f5a..25fe34adc 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -424,13 +424,7 @@ void MainTab::updateDiveInfo(bool clear) setEnabled(false); editMode = IGNORE; // don't trigger on changes to the widgets - // This method updates ALL tabs whenever a new dive or trip is - // selected. - // If exactly one trip has been selected, we show the location / notes - // for the trip in the Info tab, otherwise we show the info of the - // selected_dive process_selected_dives(); - process_all_dives(); for (auto widget : extraWidgets) { widget->updateData(); |