diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index eda156a08..cd0f56838 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2005-05-06 Don Allingham + * src/ReadXML.py: fix handling of non-gregorian dates + * src/EditPerson.py: faster building of place lists using cursors + 2005-05-06 Martin Hawlisch * src/gramps_main.py (undo): Block signals during undo to make it MUCH faster when undoing larger imports or plugin runs diff --git a/gramps2/src/EditPerson.py b/gramps2/src/EditPerson.py index 067a7b88d..b5fceee5d 100644 --- a/gramps2/src/EditPerson.py +++ b/gramps2/src/EditPerson.py @@ -122,9 +122,7 @@ class EditPerson: person.get_gender () == RelLib.Person.UNKNOWN) - for key in db.get_place_handles(): - p = db.get_place_from_handle(key).get_display_info() - self.pdmap[p[0]] = key + self.build_pdmap() mod = not self.db.readonly @@ -534,6 +532,15 @@ class EditPerson: self.window.show() + def build_pdmap(self): + self.pdmap.clear() + cursor = self.db.get_place_cursor() + data = cursor.next() + while data: + self.pdmap[data[1][2]] = data[0] + data = cursor.next() + cursor.close() + def image_button_press(self,obj,event): if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1: @@ -1759,10 +1766,7 @@ class EditPerson: if nick != self.person.get_nick_name(): self.person.set_nick_name(nick) - self.pdmap.clear() - for key in self.db.get_place_handles(): - p = self.db.get_place_from_handle(key).get_display_info() - self.pdmap[p[0]] = key + self.build_pdmap() if not self.orig_birth.are_equal(self.birth): if self.orig_birth.is_empty():