From 96a03b4b26e85616b6cc851be1917c7e0f63b9c1 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 4 Feb 2020 10:15:39 +0100 Subject: Dive site: don't save invalid GPS coordinates On the dive site screen, when entering invalid GPS coordinates, we cleared the location of the dive site. Don't do this. To clear the location, the user now has to enter the empty string. Signed-off-by: Berthold Stoeger --- desktop-widgets/locationinformation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index c9d11b5ee..06b89e9d1 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -267,7 +267,7 @@ void LocationInformationWidget::on_GPSbutton_clicked() void LocationInformationWidget::on_diveSiteCoordinates_editingFinished() { - if (diveSite) + if (diveSite && validateGpsText(ui.diveSiteCoordinates->text())) Command::editDiveSiteLocation(diveSite, parseGpsText(ui.diveSiteCoordinates->text())); } -- cgit v1.2.3-70-g09d2