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>
This commit is contained in:
Dirk Hohndel 2015-10-13 13:34:16 -07:00
parent b7bf5d0fb2
commit 7be0e1b1e7

View file

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