From bb4c2031ef662b632eebb41b7173d8fd8324f1c6 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Tue, 23 Oct 2018 17:26:02 +0300 Subject: Show coordinates if no tags from reverse geolookup This will display the dive site coordinates after the Location label if there are no associated tags from reverse geolookup. Thus it'll be clearer for users that we do have GPS location stored for the dive, and might be able to see more easily if the recorded coordinates are correct. Signed-off-by: Miika Turkia --- desktop-widgets/tab-widgets/maintab.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'desktop-widgets') diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 3dea277fb..8d5ecdcff 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -419,6 +419,12 @@ void MainTab::updateDiveInfo(bool clear) if (ds) { ui.location->setCurrentDiveSiteUuid(ds->uuid); ui.locationTags->setText(constructLocationTags(&ds->taxonomy, true)); + + if (ui.locationTags->text().isEmpty() && has_location(&ds->location)) { + const char *coords = printGPSCoords(&ds->location); + ui.locationTags->setText(coords); + free((void *)coords); + } } else { ui.location->clear(); ui.locationTags->clear(); -- cgit v1.2.3-70-g09d2