From 654a7be834189ced04c26904026c2710438b23df Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Fri, 11 Sep 2015 11:31:02 +0200 Subject: Add checkbox to force images to match dives Give the user the possibility to attach images to a dive even when the times do not match Signed-off-by: Robert C. Helling Signed-off-by: Dirk Hohndel --- dive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dive.c') diff --git a/dive.c b/dive.c index 4e902d7d2..c81584e65 100644 --- a/dive.c +++ b/dive.c @@ -2989,12 +2989,12 @@ bool picture_check_valid(char *filename, int shift_time) return false; } -void dive_create_picture(struct dive *dive, char *filename, int shift_time) +void dive_create_picture(struct dive *dive, char *filename, int shift_time, bool match_all) { timestamp_t timestamp = picture_get_timestamp(filename); if (!new_picture_for_dive(dive, filename)) return; - if (!dive_check_picture_time(dive, shift_time, timestamp)) + if (!match_all && !dive_check_picture_time(dive, shift_time, timestamp)) return; struct picture *picture = alloc_picture(); -- cgit v1.2.3-70-g09d2