diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-10-22 21:57:02 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-10-26 11:38:26 -0700 |
commit | bf6a644fc63a0eb9ae74ce55d31777ae7290056b (patch) | |
tree | 1033ee2f1a13e57de4675b8e376ccd20483e2546 /core/gpslocation.cpp | |
parent | 4c55074bd771240848967a183a3681bfc8e14b8c (diff) | |
download | subsurface-bf6a644fc63a0eb9ae74ce55d31777ae7290056b.tar.gz |
Mobile: provide better tracking of applied GPS fixes
Also reset the page stack to make sure we don't end up with stale data.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/gpslocation.cpp')
-rw-r--r-- | core/gpslocation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp index 974b9636b..c12d0a1d1 100644 --- a/core/gpslocation.cpp +++ b/core/gpslocation.cpp @@ -225,14 +225,14 @@ static void copy_gps_location(struct gpsTracker &gps, struct dive *d) #define SET_LOCATION(_dive, _gpsfix, _mark) \ { \ copy_gps_location(_gpsfix, _dive); \ - changed = true; \ + changed++; \ last = _mark; \ } -bool GpsLocation::applyLocations() +int GpsLocation::applyLocations() { int i; - bool changed = false; + int changed = 0; int last = 0; int cnt = m_trackers.count(); if (cnt == 0) @@ -317,7 +317,7 @@ bool GpsLocation::applyLocations() } } - if (changed) + if (changed > 0) mark_divelist_changed(true); return changed; } |