diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-07-15 21:28:17 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-15 21:28:17 -0700 |
commit | 88015f402b9d0760b01c7542ce8a9e1ad3ac1ba4 (patch) | |
tree | 4a3c7183b65c606f7fd91dfa34737bbf747dd223 /divesitehelpers.cpp | |
parent | 874d3c4799a65062ca60518199f877341301e1a1 (diff) | |
download | subsurface-88015f402b9d0760b01c7542ce8a9e1ad3ac1ba4.tar.gz |
Geo taxonomy: special case for looking up data of the displayed dive site
While we are editing a dive the displayed dive site may revert back to the
special uuid of 0. This means the user modified the existing site so the
displayed dive site is now different from the dive site referenced in the
current dive.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divesitehelpers.cpp')
-rw-r--r-- | divesitehelpers.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/divesitehelpers.cpp b/divesitehelpers.cpp index 15946c49d..4fa24a348 100644 --- a/divesitehelpers.cpp +++ b/divesitehelpers.cpp @@ -53,7 +53,7 @@ void ReverseGeoLookupThread::run() { connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); Q_FOREACH (const GeoLookupInfo& info, geo_lookup_data ) { - struct dive_site *ds = get_dive_site_by_uuid(info.uuid); + struct dive_site *ds = info.uuid ? get_dive_site_by_uuid(info.uuid) : &displayed_dive_site; // first check the findNearbyPlaces API from geonames - that should give us country, state, city request.setUrl(geonamesURL.arg(uiLanguage(NULL)).arg(info.lat.udeg / 1000000.0).arg(info.lon.udeg / 1000000.0)); |