From b1037abdb7ea59b4f437b22cd42a9a0f7ef88d09 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 24 Mar 2016 11:22:12 -0700 Subject: [PATCH] QML UI: GPS location service - only show the fixes we store Signed-off-by: Dirk Hohndel --- subsurface-core/gpslocation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsurface-core/gpslocation.cpp b/subsurface-core/gpslocation.cpp index 6a65ddeff..399ed6997 100644 --- a/subsurface-core/gpslocation.cpp +++ b/subsurface-core/gpslocation.cpp @@ -118,8 +118,6 @@ void GpsLocation::newPosition(QGeoPositionInfo pos) { int64_t lastTime; QGeoCoordinate lastCoord; - QString msg("received new position %1"); - status(qPrintable(msg.arg(pos.coordinate().toString()))); int nr = m_trackers.count(); if (nr) { gpsTracker gt = m_trackers.last(); @@ -133,6 +131,8 @@ void GpsLocation::newPosition(QGeoPositionInfo pos) if (!nr || waitingForPosition || (int64_t)pos.timestamp().toTime_t() > lastTime + prefs.time_threshold || lastCoord.distanceTo(pos.coordinate()) > prefs.distance_threshold) { + QString msg("received new position %1"); + status(qPrintable(msg.arg(pos.coordinate().toString()))); waitingForPosition = false; gpsTracker gt; gt.when = pos.timestamp().toTime_t();