Avoid leading and trailing spaces when copy/paste (#747)
coordinates from a map provider. Fixes #10937
This commit is contained in:
parent
285fbf2c97
commit
97aedaae99
@ -182,8 +182,8 @@ class EditPlace(EditPrimary):
|
|||||||
def set_latlongitude(self, value):
|
def set_latlongitude(self, value):
|
||||||
try:
|
try:
|
||||||
coma = value.index(',')
|
coma = value.index(',')
|
||||||
self.longitude.set_text(value[coma+1:])
|
self.longitude.set_text(value[coma+1:].strip())
|
||||||
self.latitude.set_text(value[:coma])
|
self.latitude.set_text(value[:coma].strip())
|
||||||
self.top.get_object("lat_entry").validate(force=True)
|
self.top.get_object("lat_entry").validate(force=True)
|
||||||
self.top.get_object("lon_entry").validate(force=True)
|
self.top.get_object("lon_entry").validate(force=True)
|
||||||
self.obj.set_latitude(self.latitude.get_value())
|
self.obj.set_latitude(self.latitude.get_value())
|
||||||
|
@ -175,8 +175,8 @@ class EditPlaceRef(EditReference):
|
|||||||
def set_latlongitude(self, value):
|
def set_latlongitude(self, value):
|
||||||
try:
|
try:
|
||||||
coma = value.index(',')
|
coma = value.index(',')
|
||||||
self.longitude.set_text(value[coma+1:])
|
self.longitude.set_text(value[coma+1:].strip())
|
||||||
self.latitude.set_text(value[:coma])
|
self.latitude.set_text(value[:coma].strip())
|
||||||
self.top.get_object("lat_entry").validate(force=True)
|
self.top.get_object("lat_entry").validate(force=True)
|
||||||
self.top.get_object("lon_entry").validate(force=True)
|
self.top.get_object("lon_entry").validate(force=True)
|
||||||
self.source.set_latitude(self.latitude.get_value())
|
self.source.set_latitude(self.latitude.get_value())
|
||||||
|
Loading…
Reference in New Issue
Block a user