From 88015f402b9d0760b01c7542ce8a9e1ad3ac1ba4 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 15 Jul 2015 21:28:17 -0700 Subject: 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 --- divesitehelpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- cgit v1.2.3-70-g09d2