diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-24 12:05:16 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-24 12:05:16 -0800 |
commit | 100c4008099615b3db492a5da793c4d21641d1cb (patch) | |
tree | edbd589b316b696ff6f41fb5b56ca5d5955b3c19 /main.c | |
parent | d1262848d80d325605b5720961885f452426fb48 (diff) | |
parent | c521aec88452460cc139d9d74d1f23ef58eac1a6 (diff) | |
download | subsurface-100c4008099615b3db492a5da793c4d21641d1cb.tar.gz |
Merge branch 'webservice-import'
Update maxdepth / duration that have moved into the divecomputer
structure.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -165,7 +165,10 @@ void report_dives(gboolean is_imported, gboolean prefer_imported) struct dive *dive = pp[1]; struct dive *merged; - if (prev->when + prev->dc.duration.seconds < dive->when) + /* only try to merge overlapping dives - or if one of the dives has + * zero duration (that might be a gps marker from the webservice) */ + if (prev->dc.duration.seconds && dive->dc.duration.seconds && + prev->when + prev->dc.duration.seconds < dive->when) continue; merged = try_to_merge(prev, dive, prefer_imported); |