Geography : bug 8902 : ValueError: Place.set_name(name) requires a PlaceName()
This commit is contained in:
parent
8b5d1709a2
commit
54cd19ea0d
@ -49,7 +49,7 @@ import cairo
|
|||||||
# Gramps Modules
|
# Gramps Modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gramps.gen.lib import EventType, Place, PlaceType, PlaceRef
|
from gramps.gen.lib import EventType, Place, PlaceType, PlaceRef, PlaceName
|
||||||
from gramps.gen.display.name import displayer as _nd
|
from gramps.gen.display.name import displayer as _nd
|
||||||
from gramps.gen.display.place import displayer as _pd
|
from gramps.gen.display.place import displayer as _pd
|
||||||
from gramps.gui.views.navigationview import NavigationView
|
from gramps.gui.views.navigationview import NavigationView
|
||||||
@ -951,8 +951,10 @@ class GeoGraphyView(OsmGps, NavigationView):
|
|||||||
(name, coords) = place
|
(name, coords) = place
|
||||||
latlong = coords.pop()
|
latlong = coords.pop()
|
||||||
(lat, lon) = latlong
|
(lat, lon) = latlong
|
||||||
|
place_name = PlaceName()
|
||||||
|
place_name.set_value(name)
|
||||||
new_place = Place()
|
new_place = Place()
|
||||||
new_place.set_name(name)
|
new_place.set_name(place_name)
|
||||||
new_place.set_title(name)
|
new_place.set_title(name)
|
||||||
new_place.set_latitude(str(lat))
|
new_place.set_latitude(str(lat))
|
||||||
new_place.set_longitude(str(lon))
|
new_place.set_longitude(str(lon))
|
||||||
|
Loading…
Reference in New Issue
Block a user