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>
This commit is contained in:
Dirk Hohndel 2015-07-15 21:28:17 -07:00
parent 874d3c4799
commit 88015f402b

View file

@ -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));