Geography : bug when liking to a place.

svn: r17622
This commit is contained in:
Serge Noiraud 2011-05-29 21:45:38 +00:00
parent 9bb6a77850
commit f6e32ce429
2 changed files with 8 additions and 3 deletions

View File

@ -903,9 +903,12 @@ class GeoGraphyView(osmGpsMap, NavigationView):
if place:
loc = place.get_main_location()
oldv = (loc.get_country(), loc.get_state(), loc.get_county()) if loc else None
for m in self.place_list:
if m[0] == place.get_title():
self.mark = m
places_handle = self.dbstate.db.iter_place_handles()
for place_hdl in places_handle:
plce = self.dbstate.db.get_place_from_handle(place_hdl)
if plce.get_title() == place.get_title():
self.mark = [None,None,None,None,None,None,None,
None,None,plce.gramps_id,None,None]
PlaceSelection(self.uistate, self.dbstate, self.osm,
self.selection_layer, self.place_list,
lat, lon, self.__edit_place, oldv)

View File

@ -201,6 +201,8 @@ class GeoPlaces(GeoGraphyView):
"""
Create one entry for one place with a lat/lon.
"""
if place is None:
return
descr = place.get_title()
longitude = place.get_longitude()
latitude = place.get_latitude()