summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-11-26 22:08:29 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-12-06 21:56:35 +0100
commit99b2de85b5f71ad7bfd57bda5f0fb3b595b2b94f (patch)
treeea4f1087d2cf9fca2df660d8a040c7cc55b51960 /desktop-widgets
parentb6d5dacd51bb7fcab417c40a7aa48f0a63693621 (diff)
downloadsubsurface-99b2de85b5f71ad7bfd57bda5f0fb3b595b2b94f.tar.gz
Dive list: fix off-by-two bug in DiveTripModel
Commit 911edfca712a046944de6d033cc4b8dd50cedfc3 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>
Diffstat (limited to 'desktop-widgets')
0 files changed, 0 insertions, 0 deletions