diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 69e9ba474..eeeee63de 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,6 +1,8 @@ 2004-08-22 Tim Waugh * src/WriteXML.py (write_xml_data): Fixed typo causing XML export to omit all place definitions. + (XmlWriter.write_xml_data): Sort person handles before writing. + * src/RelLib.py (probably_alive): Fixed typo (bug #1012347). 2004-08-21 Alex Roitman diff --git a/gramps2/src/WriteXML.py b/gramps2/src/WriteXML.py index 0d1ace4b5..79904fd71 100644 --- a/gramps2/src/WriteXML.py +++ b/gramps2/src/WriteXML.py @@ -241,10 +241,14 @@ class XmlWriter: self.g.write(">\n") keys = self.db.get_person_handles(sort_handles=False) - keys.sort () + sorted_keys = [] for key in keys: - person = self.db.get_person_from_handle(key) - + person = self.db.get_person_from_handle (key) + tuple = (person.get_gramps_id (), person) + sorted_keys.append (tuple) + + sorted_keys.sort () + for (gramps_id, person) in sorted_keys: if self.callback and count % delta == 0: self.callback(float(count)/float(total)) count += 1