diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-09 19:46:39 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-09 21:46:56 +0100 |
commit | 7f515eb7e53c5ab6d8dde4d2e6876464ed7fdeae (patch) | |
tree | f92ba6756103c85a431f18d9333c26374ce29ceb /windows.c | |
parent | 51003eaed71ea823dc8ce88e7de0e785a50b24cb (diff) | |
download | subsurface-7f515eb7e53c5ab6d8dde4d2e6876464ed7fdeae.tar.gz |
Fix dive trip merging logic
We used to have very spotty logic for picking the dive trip when
merging two dives. It turns out that that spotty logic almost never
really matters, because in practice you'll never hit the situation of
merging two dives with different dive trips, but it *can* happen.
In particular, it happens when you use multiple dive computers, and
end up loading the dives from one computer on top of the dives of your
other computer. If the clocks of the dive computers was set
sufficiently close to each other, the dive merging logic will kick in
and you may now have slightly different times for the dives that get
merged, and the trip merging logic got *really* confused.
The trip management also depends on the trip dates being updated
correctly when the dives associated with a trip are updated (whether
added or removed), and the trip merging code did none of that.
This fixes it all up. Hopefully correctly.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'windows.c')
0 files changed, 0 insertions, 0 deletions