From 5903598e7b0aa85d6ca7798a26527fc2b742372f Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 20 Dec 2001 01:14:21 +0000 Subject: [PATCH] Fixed building existing child list. svn: r643 --- gramps/src/SelectChild.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/gramps/src/SelectChild.py b/gramps/src/SelectChild.py index d8668fcb1..5980e46c8 100644 --- a/gramps/src/SelectChild.py +++ b/gramps/src/SelectChild.py @@ -99,8 +99,6 @@ class SelectChild: self.top.show() def redraw_child_list(self,filter): - person_list = self.db.getPersonMap().values() - person_list.sort(sort.by_last_name) self.add_child.freeze() self.add_child.clear() index = 0 @@ -118,8 +116,8 @@ class SelectChild: for c in f.getChildList(): slist.append(c) - personmap = {} - for person in person_list: + person_list = [] + for person in self.db.getPersonMap().values(): if filter: if person in slist: continue @@ -158,14 +156,13 @@ class SelectChild: if pbday.getLowYear() > dday.getHighYear() + 150: continue - personmap[utils.phonebook_name(person)] = person + person_list.append(person) - keynames = personmap.keys() - keynames.sort() - for key in keynames: - person = personmap[key] - self.add_child.append([utils.phonebook_name(person),utils.birthday(person),\ - person.getId()]) + person_list.sort(sort.by_last_name) + for person in person_list: + self.add_child.append([utils.phonebook_name(person), + utils.birthday(person), + person.getId()]) self.add_child.set_row_data(index,person) index = index + 1 self.add_child.thaw()