subsurface/qt-models
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
..
cleanertablemodel.cpp
cleanertablemodel.h
CMakeLists.txt build-system: make map support its own thing 2022-04-18 07:24:38 +02:00
completionmodels.cpp core: replace dive master by dive guide 2022-02-15 09:35:43 -08:00
completionmodels.h core: replace dive master by dive guide 2022-02-15 09:35:43 -08:00
cylindermodel.cpp selection: move current dive and divecomputer to selection.cpp 2023-04-16 20:23:59 +02:00
cylindermodel.h Allow editing sensors through equipment tab 2022-03-12 11:24:50 -08:00
divecomputerextradatamodel.cpp
divecomputerextradatamodel.h
diveimportedmodel.cpp core: use divelog struct in downloader code 2023-04-14 21:20:23 +02:00
diveimportedmodel.h core: use divelog in importDives() and process_imported_dives() 2023-04-14 21:20:23 +02:00
divelocationmodel.cpp core: introduce divelog structure 2023-04-14 21:20:23 +02:00
divelocationmodel.h
divepicturemodel.cpp cleanup: implement index_of() and index_of_if() generics 2022-10-31 19:35:15 +01:00
divepicturemodel.h
diveplannermodel.cpp selection: move current dive and divecomputer to selection.cpp 2023-04-16 20:23:59 +02:00
diveplannermodel.h undo: more fine-grained undo of profile editing 2022-03-12 18:32:22 +01:00
divesiteimportmodel.cpp core: introduce divelog structure 2023-04-14 21:20:23 +02:00
divesiteimportmodel.h
divesummarymodel.cpp Ignore invalid dives in subsurface-mobile dive summary 2021-10-11 20:20:20 +03:00
divesummarymodel.h
divetripmodel.cpp selection: move current dive and divecomputer to selection.cpp 2023-04-16 20:23:59 +02:00
divetripmodel.h Desktop: Add notes column to dive list table. 2023-03-16 17:53:20 +01:00
filterconstraintmodel.cpp
filterconstraintmodel.h
filtermodels.cpp core: fold display.h into profile.h 2022-03-13 15:07:33 -07:00
filtermodels.h
filterpresetmodel.cpp
filterpresetmodel.h
maplocationmodel.cpp core: introduce divelog structure 2023-04-14 21:20:23 +02:00
maplocationmodel.h
messagehandlermodel.cpp cleanup: replace QRegExp with QRegularExpression 2021-10-27 12:36:49 -07:00
messagehandlermodel.h
mobilelistmodel.cpp core: replace dive master by dive guide 2022-02-15 09:35:43 -08:00
mobilelistmodel.h core: replace dive master by dive guide 2022-02-15 09:35:43 -08:00
models.cpp
models.h
tankinfomodel.cpp
tankinfomodel.h
treemodel.cpp
treemodel.h
weightmodel.cpp
weightmodel.h
weightsysteminfomodel.cpp
weightsysteminfomodel.h
yearlystatisticsmodel.cpp cleanup: move minute formating to format-string.cpp 2022-09-03 13:49:02 -07:00
yearlystatisticsmodel.h