mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: refresh divelist after GPS data was successfully applied
And create a helper to do so to make the code simpler. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
956b864319
commit
4f10f7f7ae
4 changed files with 19 additions and 9 deletions
|
@ -208,14 +208,14 @@ static void copy_gps_location(struct gpsTracker &gps, struct dive *d)
|
|||
}
|
||||
|
||||
#define SAME_GROUP 6 * 3600 /* six hours */
|
||||
void GpsLocation::applyLocations()
|
||||
bool GpsLocation::applyLocations()
|
||||
{
|
||||
int i;
|
||||
bool changed = false;
|
||||
int last = 0;
|
||||
int cnt = m_trackers.count();
|
||||
if (cnt == 0)
|
||||
return;
|
||||
return false;
|
||||
|
||||
// create a table with the GPS information
|
||||
QList<struct gpsTracker> gpsTable = m_trackers.values();
|
||||
|
@ -317,6 +317,7 @@ void GpsLocation::applyLocations()
|
|||
}
|
||||
if (changed)
|
||||
mark_divelist_changed(true);
|
||||
return changed;
|
||||
}
|
||||
|
||||
QMap<qint64, gpsTracker> GpsLocation::currentGPSInfo() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue