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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
cabaaa69db
commit
96a03b4b26
@ -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()));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user