summaryrefslogtreecommitdiffstats
path: root/core/version.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-11-15 10:21:57 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-15 13:50:35 -0800
commit2f77716e8f9bef3f9ef26dfdcb99f17e681c4c6f (patch)
tree7217e2cddf1af4dd3d411babe94673f8eebfcdf9 /core/version.c
parent5e29245e689fe9401ee1c33ebb07c601ce25e8c6 (diff)
downloadsubsurface-2f77716e8f9bef3f9ef26dfdcb99f17e681c4c6f.tar.gz
Dive list: signal correct trip in DiveTripModelTree::topLevelChanged
DiveTripModelTree::topLevelChanged() has pretty complex code, as it has to handle the fact that when adding/removing a dive from a trip, the trip can change its position. The code did not account for the fact that when moving an object back in the top level list, one has to subtract one from the new index, because the object was removed somewhere in the front of the list. To make matters worse, when an entry stayed where it was, this was realized by moving the entry right behind itself, which of course means that it stays where it is. But this meant that in the by far most common case (no moving) the wrong entry was updated. Fix this by subtracting 1 from the new index when moving an entry to the back. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/version.c')
0 files changed, 0 insertions, 0 deletions