Coordinates containing a comma instead of a period

Fixes #11823
This commit is contained in:
SNoiraud 2020-07-02 16:36:58 +02:00 committed by Paul Culley
parent 981c0dfc5c
commit 41f1e91600
2 changed files with 10 additions and 6 deletions

View File

@ -188,8 +188,10 @@ class EditPlace(EditPrimary):
def set_latlongitude(self, value):
try:
coma = value.index(', ')
self.longitude.set_text(value[coma+1:].strip())
self.latitude.set_text(value[:coma].strip())
longitude = value[coma+2:].strip().replace(',','.')
latitude = value[:coma].strip().replace(',','.')
self.longitude.set_text(longitude)
self.latitude.set_text(latitude)
self.top.get_object("lat_entry").validate(force=True)
self.top.get_object("lon_entry").validate(force=True)
self.obj.set_latitude(self.latitude.get_value())

View File

@ -181,8 +181,10 @@ class EditPlaceRef(EditReference):
def set_latlongitude(self, value):
try:
coma = value.index(', ')
self.longitude.set_text(value[coma+1:].strip())
self.latitude.set_text(value[:coma].strip())
longitude = value[coma+2:].strip().replace(',','.')
latitude = value[:coma].strip().replace(',','.')
self.longitude.set_text(longitude)
self.latitude.set_text(latitude)
self.top.get_object("lat_entry").validate(force=True)
self.top.get_object("lon_entry").validate(force=True)
self.source.set_latitude(self.latitude.get_value())