From 8c0ad73c2e41303b3f1829fe2c3db7f337830f90 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 15 Dec 2005 00:00:47 +0000 Subject: [PATCH] * src/plugins/DescendReport.py (dump): Initialize child list for each family. svn: r5550 --- gramps2/ChangeLog | 2 ++ gramps2/src/plugins/DescendReport.py | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 3166c1980..3b5e1f3a0 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,6 +1,8 @@ 2005-12-14 Alex Roitman * src/plugins/PatchNames.py: Fix title/name mixup, only detect new title, keep old title, keep old prefix. + * src/plugins/DescendReport.py (dump): Initialize child list for + each family. 2005-12-12 Alex Roitman * configure.in: bump up the version number. diff --git a/gramps2/src/plugins/DescendReport.py b/gramps2/src/plugins/DescendReport.py index a88a3cae5..5a67e7380 100644 --- a/gramps2/src/plugins/DescendReport.py +++ b/gramps2/src/plugins/DescendReport.py @@ -112,13 +112,15 @@ class DescendantReport(Report.Report): if birth: bplace_handle = birth.get_place_handle() if bplace_handle: - birth_place = self.database.get_place_from_handle(bplace_handle).get_title() + birth_place = self.database.get_place_from_handle( + bplace_handle).get_title() death_place = "" if death: dplace_handle = death.get_place_handle() if dplace_handle: - death_place = self.database.get_place_from_handle(dplace_handle).get_title() + death_place = self.database.get_place_from_handle( + dplace_handle).get_title() if birth_year_valid: if birth_place: @@ -163,7 +165,6 @@ class DescendantReport(Report.Report): if level >= self.max_generations: return - childlist = [] for family_handle in person.get_family_handle_list(): family = self.database.get_family_from_handle(family_handle) @@ -176,10 +177,9 @@ class DescendantReport(Report.Report): self.dump_dates(spouse) self.doc.end_paragraph() - for child_handle in family.get_child_handle_list(): - childlist.append(child_handle) - + childlist = family.get_child_handle_list()[:] childlist.sort(self.by_birthdate) + for child_handle in childlist: child = self.database.get_person_from_handle(child_handle) self.dump(level+1,child) @@ -230,7 +230,8 @@ class DescendantOptions(ReportOptions.ReportOptions): p.set_bottom_margin(ReportUtils.pt2cm(f.get_size()*0.125)) p.set_first_indent(-0.5) p.set_left_margin(min(10.0,float(i-0.5))) - p.set_description(_("The style used for the level %d display.") % i) + p.set_description(_("The style used for the " + "level %d display.") % i) default_style.add_style("DR-Level%d" % i,p) p = BaseDoc.ParagraphStyle() @@ -238,7 +239,8 @@ class DescendantOptions(ReportOptions.ReportOptions): p.set_top_margin(ReportUtils.pt2cm(f.get_size()*0.125)) p.set_bottom_margin(ReportUtils.pt2cm(f.get_size()*0.125)) p.set_left_margin(min(10.0,float(i-0.5))) - p.set_description(_("The style used for the spouse level %d display.") % i) + p.set_description(_("The style used for the " + "spouse level %d display.") % i) default_style.add_style("DR-Spouse%d" % i,p) #------------------------------------------------------------------------