diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-02-13 13:01:50 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-13 14:01:57 -0800 |
commit | 9245962d3d9d253b86358295bfc93b886eab5112 (patch) | |
tree | 008b283bf2f1811c35956924a3a21d50c1360912 | |
parent | 619de80dfd1e896bf023ba8c3f8ee3297fcd3abb (diff) | |
download | subsurface-9245962d3d9d253b86358295bfc93b886eab5112.tar.gz |
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 <dirk@hohndel.org>
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | core/gpslocation.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b8903799..93e0ef212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +Mobile: fix saving newly applied GPS fixes to storage Desktop: add starts-with and exact filter modes for textual search Mobile: add option to only show one column in portrait mode Mobile: fix potential crash when adding / editing dives 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; \ } |