diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-10-13 13:34:16 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-13 13:34:16 -0700 |
commit | 7be0e1b1e782a2bd4aa789bbcae3e39c3eb953f9 (patch) | |
tree | e2200d0c8d5057d65cd5421916cad888ef287643 /qt-ui/locationinformation.cpp | |
parent | b7bf5d0fb2c8f07f9472b3dfdfd86263d50e396f (diff) | |
download | subsurface-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.cpp | 3 |
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); |