diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-16 21:44:57 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-09 12:41:57 -0700 |
commit | c8ec2f5b1ccd72d9ed5036bf9ecfec3b5f90964b (patch) | |
tree | 48b096b31a804aa55d3d8db30522e8e1ae681f7c /core/gpslocation.cpp | |
parent | 93bdaa9bb5be80115dc80af569a2c64e0136c5f5 (diff) | |
download | subsurface-c8ec2f5b1ccd72d9ed5036bf9ecfec3b5f90964b.tar.gz |
mobile: use undo-command to apply gps fixes
The goal is to send the signal for the correct dives / divesites
and thus not having to reload the whole model.
Right now the mobile UI does not yet catch the diveSiteChanged signals.
[Dirk Hohndel: small fix to ensure that we trigger a save to storage]
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/gpslocation.cpp')
-rw-r--r-- | core/gpslocation.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp index 3f4fb887d..e4a9b5185 100644 --- a/core/gpslocation.cpp +++ b/core/gpslocation.cpp @@ -310,23 +310,6 @@ std::vector<DiveAndLocation> GpsLocation::getLocations() return fixes; } -int GpsLocation::applyLocations() -{ - std::vector<DiveAndLocation> fixes = getLocations(); - for (DiveAndLocation &dl: fixes) { - struct dive_site *ds = dl.d->dive_site; - if (!ds) { - ds = create_dive_site(qPrintable(dl.name), &dive_site_table); - add_dive_to_dive_site(dl.d, ds); - invalidate_dive_cache(dl.d); - } - ds->location = dl.location; - } - if (!fixes.empty()) - mark_divelist_changed(true); - return !fixes.empty(); -} - QMap<qint64, gpsTracker> GpsLocation::currentGPSInfo() const { return m_trackers; |