aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/locationinformation.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-13 13:34:16 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-13 13:34:16 -0700
commit7be0e1b1e782a2bd4aa789bbcae3e39c3eb953f9 (patch)
treee2200d0c8d5057d65cd5421916cad888ef287643 /qt-ui/locationinformation.cpp
parentb7bf5d0fb2c8f07f9472b3dfdfd86263d50e396f (diff)
downloadsubsurface-7be0e1b1e782a2bd4aa789bbcae3e39c3eb953f9.tar.gz
Keep state of reverse geocode button in sync with GPS data
So if the data is removed or invalid, don't allow reverse lookup. Otherwise do. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r--qt-ui/locationinformation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 19a4ad5f2..e581757dd 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -236,6 +236,9 @@ void LocationInformationWidget::on_diveSiteCoordinates_textChanged(const QString
displayed_dive_site.longitude.udeg = longitude * 1000000;
markChangedWidget(ui.diveSiteCoordinates);
emit coordinatesChanged();
+ ui.geoCodeButton->setEnabled(latitude != 0 && longitude != 0);
+ } else {
+ ui.geoCodeButton->setEnabled(false);
}
}
free((void *)coords);