subsurface/desktop-widgets/tab-widgets
Berthold Stoeger c32e71e64d Dive information: fix surface interval calculation
The old surface interval calculation had fundamental issues:

1) process_all_dives(), which calculates the statistics over *all*
   dives was used to get the pointer to the previous dive.
2) If two dives in the table had the same time, one of those would
   have been considered the "previous" dive.
3) If the dive, for which the surface interval is calculated is
   not yet in the table, no previous dive would be determined.

Fix all this by creating a get_surface_interval() function and
removing the "get previous dive" functionality of process_all_dives().
Remove the process_all_dives() call from TabDiveInformation::updateData().

Reported-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-07 05:41:48 +03:00
..
maintab.cpp Dive information: fix surface interval calculation 2018-10-07 05:41:48 +03:00
maintab.h Filter: remove diveSiteAdded signal of MainTab 2018-08-31 07:48:23 -07:00
maintab.ui Use better aliases for icons. 2017-11-30 23:14:46 -08:00
TabBase.cpp Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabBase.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabDiveExtraInfo.cpp Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabDiveExtraInfo.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveExtraInfo.ui Break down MainTab into smaller classes 2017-04-06 18:23:25 -07:00
TabDiveInformation.cpp Dive information: fix surface interval calculation 2018-10-07 05:41:48 +03:00
TabDiveInformation.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveInformation.ui Choose water presets from a qcombobox in planner, custom value possible 2018-03-02 08:38:22 -08:00
TabDivePhotos.cpp Dive media: implement "Open folder of selected media files" 2018-07-20 08:29:27 +02:00
TabDivePhotos.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDivePhotos.ui Implement different zoom levels for dive photos tab 2017-12-18 12:07:10 -08:00
TabDiveStatistics.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
TabDiveStatistics.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveStatistics.ui Change layout of information and statistics tab... 2017-05-01 21:24:02 -07:00