summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-30 07:45:55 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-30 07:47:20 -0400
commitebc3b148dbb57d8da77cfa93e22d77fffc2b9ea1 (patch)
treebaee239217dede707e061a560dd01d015b784aa5
parentaedbde1e8683b2643e29040c849c39bec4d00a22 (diff)
downloadsubsurface-ebc3b148dbb57d8da77cfa93e22d77fffc2b9ea1.tar.gz
Don't merge manually added dives
If the user added a dive manually we have a hard time trusting the start time and duration. We just shouldn't automatically merge them with anything else. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--dive.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index 9c70a121c..49b2312d2 100644
--- a/dive.c
+++ b/dive.c
@@ -2230,6 +2230,11 @@ static int likely_same_dive(struct dive *a, struct dive *b)
{
int match, fuzz = 20 * 60;
+ /* don't merge manually added dives with anything */
+ if (same_string(a->dc.model, "manually added dive") ||
+ same_string(b->dc.model, "manually added dive"))
+ return 0;
+
/* Don't try to merge dives with different trip information */
if (a->divetrip != b->divetrip) {
/*