(XmlWriter.write_xml_data): Sort person handles before writing.

svn: r3470
This commit is contained in:
Tim Waugh 2004-08-22 12:21:01 +00:00
parent fbeab25019
commit 98fd53922f
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,8 @@
2004-08-22 Tim Waugh <twaugh@redhat.com>
* 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 <shura@alex.neuro.umn.edu>

View File

@ -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