diff --git a/ChangeLog b/ChangeLog index 699b5c796..79d1e2dc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-08-23 Tim Waugh + + * src/WriteGedcom.py (GedcomWriter.write_families): Write families + in GRAMPS ID order for easier change tracking. + 2004-08-22 Tim Waugh * src/WriteGedcom.py (GedcomWriter.export_data): Write individuals diff --git a/src/WriteGedcom.py b/src/WriteGedcom.py index 7afc47f17..035d44819 100644 --- a/src/WriteGedcom.py +++ b/src/WriteGedcom.py @@ -746,10 +746,15 @@ class GedcomWriter: def write_families(self): nump = float(len(self.flist)) index = 0.0 - for family_handle in self.flist.keys(): + sorted = [] + for family_handle in self.flist.keys (): family = self.db.get_family_from_handle(family_handle) + tuple = (self.fid (family_handle), family_handle, family) + sorted.append (tuple) + sorted.sort () + for (gramps_id, family_handle, family) in sorted: father_alive = mother_alive = 0 - self.writeln("0 @%s@ FAM" % self.fid(family_handle)) + self.writeln("0 @%s@ FAM" % gramps_id) self.frefn(family_handle) person_handle = family.get_father_handle() if person_handle != None and self.plist.has_key(person_handle):