Place editor, copy and paste of lat and long text
no longer auto-populating latitude and longitude fields Fixes #012349
This commit is contained in:
parent
a3b37b9627
commit
6dcb1d00d5
@ -187,9 +187,14 @@ class EditPlace(EditPrimary):
|
||||
|
||||
def set_latlongitude(self, value):
|
||||
try:
|
||||
coma = value.index(', ')
|
||||
longitude = value[coma+2:].strip().replace(',','.')
|
||||
latitude = value[:coma].strip().replace(',','.')
|
||||
# Bug 12349
|
||||
parts = value.index(', ')
|
||||
if len(parts) == 2:
|
||||
longitude = parts[0].strip().replace(',', '.')
|
||||
latitude = parts[1].strip().replace(',', '.')
|
||||
else:
|
||||
longitude, latitude = value.split(',')
|
||||
|
||||
self.longitude.set_text(longitude)
|
||||
self.latitude.set_text(latitude)
|
||||
self.top.get_object("lat_entry").validate(force=True)
|
||||
|
@ -180,9 +180,14 @@ class EditPlaceRef(EditReference):
|
||||
|
||||
def set_latlongitude(self, value):
|
||||
try:
|
||||
coma = value.index(', ')
|
||||
longitude = value[coma+2:].strip().replace(',','.')
|
||||
latitude = value[:coma].strip().replace(',','.')
|
||||
# Bug 12349
|
||||
parts = value.index(', ')
|
||||
if len(parts) == 2:
|
||||
longitude = parts[0].strip().replace(',', '.')
|
||||
latitude = parts[1].strip().replace(',', '.')
|
||||
else:
|
||||
longitude, latitude = value.split(',')
|
||||
|
||||
self.longitude.set_text(longitude)
|
||||
self.latitude.set_text(latitude)
|
||||
self.top.get_object("lat_entry").validate(force=True)
|
||||
|
Loading…
Reference in New Issue
Block a user