diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-12-15 20:40:16 -1000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-12-15 21:01:29 -1000 |
commit | 2f9960f20b292a2fa8c01da4a0c4600c71f4fc3a (patch) | |
tree | 7940972608a6c0fdc825e57a45451ccd5efe23a9 /gtk-gui.c | |
parent | be9d924cf833fd4f4de478cbc5dccbb3775acc3d (diff) | |
download | subsurface-2f9960f20b292a2fa8c01da4a0c4600c71f4fc3a.tar.gz |
Deal with some trip issues when editing dive timestamps
The idea behind editing timestamps had of course been the typical "oops, I
forgot to set my time correctly" which shifts a dive (or a few of them) by
a few hours but keeps the overall order of dives the same).
But reasonable people might argue that they can envision a scenario where
more dramatic changes are being made. And we need to deal with the impact
this has on dive trips.
Here we handle a couple of simple cases:
- this is the only dive in a trip; just update the trip
(this can still cause problems if the new time is in the middle of an
existing trip).
- this dives moves before the start of the trip it is in; let's remove it
from that trip (this response is a bit simplistic - but as I tried to
say, I don't expect this to be a common use case; and removing it at
least doesn't lead to entirely unexpected behavior).
- this dive moves past the end of this trip into the range of a different
trip (in this case we remove the dive from the current trip and allow it
to interrupt the trip it is moving into).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
0 files changed, 0 insertions, 0 deletions