summaryrefslogtreecommitdiffstats
path: root/display.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-07 10:12:31 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-07 10:12:31 -0700
commitb49b081bb9c3938e5df201350a3a7d397c2c6216 (patch)
tree0fb28dc9756f18ce13011e5754882c789f444cf9 /display.h
parent6ddf0e1d227bdf707469a2d7313ea850d35a6cda (diff)
downloadsubsurface-b49b081bb9c3938e5df201350a3a7d397c2c6216.tar.gz
Handle new dives correctly if trips exist
There is an interesting issue when adding new dives into a dive list with existing trips. Since fill_dive_list walks the list backwards and trips are determined by the timestamp of the first dive in a trip, it is non-trivial to know when a dive is added if it should be part of an existing trip or not. Let's say when we see the dive we can also see a trip entry that starts four days earlier. Without looking forward in the list of dives we cannot tell if this is a multi-day trip that this dive would fit into, or if there is a break of more than tree days (our current trip threshold). Instead this commit adds a second scan of the dives in chronological order that does the right thing for new dives. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'display.h')
0 files changed, 0 insertions, 0 deletions