subsurface/qt-models
Berthold Stoeger 687f65bf77 planner: avoid out-of-bound access when initializing the planner
For dives with many samples (i.e. logged dives), samples are merged.

I'm not exactly sure how this code works, but it does an
out-of-bound access in some cases. Avoid that by a simple
check.

That said, I wonder if this downsampling is a good idea. A user
reports that they have logged dives marked as manually added dives.
We now load them into edit mode, which means a significant loss
of information.

Perhaps we should consider dives with more than 100 samples as
non-manual dives?

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2023-01-19 14:26:00 +01:00
..
cleanertablemodel.cpp
cleanertablemodel.h
CMakeLists.txt
completionmodels.cpp
completionmodels.h
cylindermodel.cpp
cylindermodel.h
divecomputerextradatamodel.cpp
divecomputerextradatamodel.h
diveimportedmodel.cpp
diveimportedmodel.h
divelocationmodel.cpp
divelocationmodel.h
divepicturemodel.cpp
divepicturemodel.h
diveplannermodel.cpp planner: avoid out-of-bound access when initializing the planner 2023-01-19 14:26:00 +01:00
diveplannermodel.h
divesiteimportmodel.cpp
divesiteimportmodel.h
divesummarymodel.cpp
divesummarymodel.h
divetripmodel.cpp
divetripmodel.h
filterconstraintmodel.cpp
filterconstraintmodel.h
filtermodels.cpp
filtermodels.h
filterpresetmodel.cpp
filterpresetmodel.h
maplocationmodel.cpp
maplocationmodel.h
messagehandlermodel.cpp
messagehandlermodel.h
mobilelistmodel.cpp
mobilelistmodel.h
models.cpp
models.h
tankinfomodel.cpp
tankinfomodel.h
treemodel.cpp
treemodel.h
weightmodel.cpp
weightmodel.h
weightsysteminfomodel.cpp
weightsysteminfomodel.h
yearlystatisticsmodel.cpp
yearlystatisticsmodel.h