Avoid leading and trailing spaces when copy/paste (#747)

coordinates from a map provider.

Fixes #10937
This commit is contained in:
Serge Noiraud 2018-12-29 06:41:24 +01:00 committed by Sam Manzi
parent 285fbf2c97
commit 97aedaae99
2 changed files with 4 additions and 4 deletions

View File

@ -182,8 +182,8 @@ class EditPlace(EditPrimary):
def set_latlongitude(self, value):
try:
coma = value.index(',')
self.longitude.set_text(value[coma+1:])
self.latitude.set_text(value[:coma])
self.longitude.set_text(value[coma+1:].strip())
self.latitude.set_text(value[:coma].strip())
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

@ -175,8 +175,8 @@ class EditPlaceRef(EditReference):
def set_latlongitude(self, value):
try:
coma = value.index(',')
self.longitude.set_text(value[coma+1:])
self.latitude.set_text(value[:coma])
self.longitude.set_text(value[coma+1:].strip())
self.latitude.set_text(value[:coma].strip())
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())