subsurface/desktop-widgets/tab-widgets
Berthold Stoeger ce140f2925 Desktop: fix crash on dive site tab
An interesting crash:

1) On the dive site tab select a dive site such that only one
   trip is shown.
2) Unselect all dives.
3) Press CTRL-A while the dive list has focus.
4) This will select a trip.
5) In MainTab::updateDiveInfo() this will switch to the previous
   tab active when in trip mode.
6) This will reset the filter.
7) This will reset the currentTrip field which we just set.
8) Since we just set the currentTrip field, we don't expect
   it to change and reference a null pointer.

To fix, don't switch tabs when on the dive site tab. This also
improves user experience as there seems to be no reason to switch
away from the dive site tab.

Currently the index of the dive site tab is hard-coded - this
should be changed!

Fixes #2077

Reported-by: Doug Junkins <junkins@foghead.com>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-05-05 08:53:19 -07:00
..
maintab.cpp Desktop: fix crash on dive site tab 2019-05-05 08:53:19 -07:00
maintab.h Cleanup: remove completers from MainTab object 2019-04-15 10:30:04 +12:00
maintab.ui Cleanup: Move dive-equipment tab into own translation units 2019-04-15 10:30:04 +12: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
TabDiveEquipment.cpp Cleanup: Move dive-equipment tab into own translation units 2019-04-15 10:30:04 +12:00
TabDiveEquipment.h Cleanup: Move dive-equipment tab into own translation units 2019-04-15 10:30:04 +12:00
TabDiveEquipment.ui Cleanup: Move dive-equipment tab into own translation units 2019-04-15 10:30:04 +12: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 Cleanup: Move dive-equipment tab into own translation units 2019-04-15 10:30:04 +12:00
TabDiveInformation.cpp Cleanup: remove redundant string clearing 2019-04-29 12:58:49 -07:00
TabDiveInformation.h Desktop: automatically update dive information tab 2019-04-29 12:58:49 -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 Write dive data as video subtitles 2019-04-16 20:38:19 +02:00
TabDivePhotos.h Write dive data as video subtitles 2019-04-16 20:38:19 +02:00
TabDivePhotos.ui Implement different zoom levels for dive photos tab 2017-12-18 12:07:10 -08:00
TabDiveSite.cpp Desktop: put dive site table in "row selection mode" 2019-04-13 15:48:46 +03:00
TabDiveSite.h Dive sites: show dives at selected dive sites 2019-04-12 18:19:07 +03:00
TabDiveSite.ui Dive sites: add fulltext filter 2019-04-12 18:19:07 +03:00
TabDiveStatistics.cpp optimize selectedDivesGasUsed() 2019-04-12 12:59:17 +03:00
TabDiveStatistics.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveStatistics.ui Show average max depth in statistics tab 2018-12-17 12:18:26 +01:00