subsurface/qt-models
Berthold Stoeger 99b2de85b5 Dive list: fix off-by-two bug in DiveTripModel
Commit 911edfca71 changed the dive list
on desktop to update positions of trips when adding/removing dives.
A very unlikely case, but necessary for consistency.

For a trip to be moveable down, its index has to be one-less than
the maximum index, which is "items - 1". The code was doubly wrong:
it forget the "1" and checked for less-or-equal instead less-than.
Thus this was effectively an off-by-two error. Fix it.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-12-06 21:56:35 +01:00
..
cleanertablemodel.cpp
cleanertablemodel.h
CMakeLists.txt
completionmodels.cpp
completionmodels.h
cylindermodel.cpp
cylindermodel.h
divecomputerextradatamodel.cpp
divecomputerextradatamodel.h
divecomputermodel.cpp
divecomputermodel.h
diveimportedmodel.cpp
diveimportedmodel.h
divelistmodel.cpp Filter: use hidden_by_filter also on mobile 2018-11-23 13:22:24 -08:00
divelistmodel.h Filter: use hidden_by_filter also on mobile 2018-11-23 13:22:24 -08:00
divelocationmodel.cpp
divelocationmodel.h
divepicturemodel.cpp
divepicturemodel.h
diveplannermodel.cpp
diveplannermodel.h
diveplotdatamodel.cpp
diveplotdatamodel.h
divetripmodel.cpp Dive list: fix off-by-two bug in DiveTripModel 2018-12-06 21:56:35 +01:00
divetripmodel.h Dive list: update position of trip if data changed 2018-11-18 16:50:09 -08:00
filtermodels.cpp Cleanup: make "struct dive *" and "struct dive_trip *" Qt metatypes 2018-11-23 13:22:24 -08:00
filtermodels.h Dive list: implement custom lessThan function 2018-11-01 07:28:15 -07:00
gpslistmodel.cpp
gpslistmodel.h
maplocationmodel.cpp Dive list: don't pass dive_site via uintptr_t through QML 2018-10-29 00:09:31 +00:00
maplocationmodel.h Dive list: don't pass dive_site via uintptr_t through QML 2018-10-29 00:09:31 +00:00
messagehandlermodel.cpp
messagehandlermodel.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