subsurface/desktop-widgets/tab-widgets
Berthold Stoeger 9f455b1457 selection: move current dive and divecomputer to selection.cpp
This tries to encapsulate the management of the current dive and
divecomputer in the selection code. The current dive is alreay
set by setSelection(). Add a new parameter to also set the
current divecomputer. If -1 is passed, then the current
computer number is remained. This will allow us to audit the code.
Because for now, the whole "current dive computer" thing seems
to be ill-defined.

This fixes a bug: the dive-computer number wasn't validated
when making a new dive the current dive. The new code has some
drawbacks though: when selecting a whole trip, the validation
will be called for all dives in the trip and thus the dive computer
number will depend on the dive with the lowest amount of dive
computers in the trip. This will need to be fixed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2023-04-16 20:23:59 +02:00
..
maintab.cpp Merge remote-tracking branch 'origin/bstoeger-divesites' 2022-09-23 08:02:54 -07:00
maintab.h cleanup: remove maintab.ui 2022-03-12 18:33:34 +01:00
TabBase.cpp cleanup: replace empty TabBase constructor by using directive 2022-03-12 18:33:34 +01:00
TabBase.h cleanup: replace empty TabBase constructor by using directive 2022-03-12 18:33:34 +01:00
TabDiveEquipment.cpp Cylindermodel: Improve editing of tank use 2023-02-07 14:20:29 +01:00
TabDiveEquipment.h cylinders: only hide cylinders at the end of the list 2021-12-13 11:54:24 -08:00
TabDiveEquipment.ui desktop: generalize the colorization of the tab widget 2020-11-03 23:08:39 -08:00
TabDiveExtraInfo.cpp selection: move current dive and divecomputer to selection.cpp 2023-04-16 20:23:59 +02: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 selection: move current dive and divecomputer to selection.cpp 2023-04-16 20:23:59 +02:00
TabDiveInformation.h desktop: automatically pick a good theme title color 2020-11-04 14:47:10 -08:00
TabDiveInformation.ui desktop: generalize the colorization of the tab widget 2020-11-03 23:08:39 -08:00
TabDiveNotes.cpp core: don't consider dives with many samples as manually added 2022-10-21 16:51:57 -07:00
TabDiveNotes.h cleanup: break out the dive-notes tab 2022-03-12 18:33:32 +01:00
TabDiveNotes.ui cleanup: break out the dive-notes tab 2022-03-12 18:33:32 +01:00
TabDivePhotos.cpp selection: move current dive and divecomputer to selection.cpp 2023-04-16 20:23:59 +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
TabDiveStatistics.cpp desktop: fix div-by-zero when selecting multiple invalid dives 2021-10-11 20:53:41 +03:00
TabDiveStatistics.h desktop: move MinMaxAvgWidget to TabDiveStatistics 2020-10-26 20:56:56 -07:00
TabDiveStatistics.ui Reorganise the current statistics tab 2020-11-04 11:34:26 -08:00