diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-02 09:52:43 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-02 10:26:30 -0800 |
commit | b900a211656bac71ef54ccec5361671e8fa5874c (patch) | |
tree | 84d93db4448f6b60577fb443ff8694e425eb48de /gtk-gui.c | |
parent | 52f438bcd07754b2c4aae7d20359de9ac2092705 (diff) | |
download | subsurface-b900a211656bac71ef54ccec5361671e8fa5874c.tar.gz |
Fix mixed dive/trip tree model grouping
In commit 96db56f89c76 ("Allow overlapping (and disjoint) dive trips")
I allowed dives to be part of arbitrary dive trips regardless of date,
which meant that the divelist tree model code needed to find the right
parent for a dive as it was inserted.
That code stupidly assumed that the top level of the dive list tree
containted *only* trips, which is not at all the case. It happens to
be true if you group all your dives into divetrips (the common case
for autogroup=1, which real users do tend to have), but now that Dirk
made the autogrouping be a per-xml-file setting, it became much easier
to trigger the "mixed trips and non-trip dives" case, and that showed
the stupid bug with the test dives.
So instead of just blindly iterating to the 'n'th entry, search for
the actual entry that is the dive trip we want to associate a dive
with.
Reported-by: Lubomir Ivanov <neolit123@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
0 files changed, 0 insertions, 0 deletions