Geography : initialization problem in geoclose.

svn: r19360
This commit is contained in:
Serge Noiraud 2012-04-19 15:03:04 +00:00
parent 0b447c49a0
commit da3349ff55

View File

@ -196,6 +196,7 @@ class GeoClose(GeoGraphyView):
self.place_list_active = [] self.place_list_active = []
self.place_list_ref = [] self.place_list_ref = []
self.all_place_list = [] self.all_place_list = []
self.sort = []
self.place_without_coordinates = [] self.place_without_coordinates = []
self.remove_all_gps() self.remove_all_gps()
self.remove_all_markers() self.remove_all_markers()
@ -204,7 +205,6 @@ class GeoClose(GeoGraphyView):
color = self._config.get('geography.color1') color = self._config.get('geography.color1')
self._createmap(self.refperson, color, self.place_list_ref, True) self._createmap(self.refperson, color, self.place_list_ref, True)
active = self.get_active() active = self.get_active()
self.init_new_compare()
if active: if active:
p1 = self.dbstate.db.get_person_from_handle(active) p1 = self.dbstate.db.get_person_from_handle(active)
self.change_active(active) self.change_active(active)
@ -249,7 +249,6 @@ class GeoClose(GeoGraphyView):
active = self.get_active() active = self.get_active()
person = self.dbstate.db.get_person_from_handle(active) person = self.dbstate.db.get_person_from_handle(active)
self.lifeway_layer.clear_ways() self.lifeway_layer.clear_ways()
self.init_new_compare()
self.goto_handle(handle=person) self.goto_handle(handle=person)
def draw(self, menu, marks, color, reference): def draw(self, menu, marks, color, reference):
@ -403,14 +402,6 @@ class GeoClose(GeoGraphyView):
for the_list in self.sort, sort1 : merge_list += the_list for the_list in self.sort, sort1 : merge_list += the_list
self.sort = sorted(merge_list, key=operator.itemgetter(6)) self.sort = sorted(merge_list, key=operator.itemgetter(6))
def init_new_compare(self):
"""
Initialize.
"""
self.place_list = []
self.sort = []
self.place_without_coordinates = []
def bubble_message(self, event, lat, lon, marks): def bubble_message(self, event, lat, lon, marks):
""" """
Create the menu for the selected marker Create the menu for the selected marker