From 9245962d3d9d253b86358295bfc93b886eab5112 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 13 Feb 2020 13:01:50 -0800 Subject: mobile/gps: make sure updated GPS data are saved If we change the gps location of a dive that didn't have a dive site associated before (which is the normal case when a dive was just downloaded from a dive computer), a new dive site is created with that GPS fix and added to the dive. We need to mark that dive as changed in order for the changes to be saved to storage. Signed-off-by: Dirk Hohndel --- core/gpslocation.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'core/gpslocation.cpp') diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp index c12d0a1d1..257764a05 100644 --- a/core/gpslocation.cpp +++ b/core/gpslocation.cpp @@ -225,6 +225,7 @@ static void copy_gps_location(struct gpsTracker &gps, struct dive *d) #define SET_LOCATION(_dive, _gpsfix, _mark) \ { \ copy_gps_location(_gpsfix, _dive); \ + invalidate_dive_cache(_dive); \ changed++; \ last = _mark; \ } -- cgit v1.2.3-70-g09d2