diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 1b6e8b9bb..1270b1ab7 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,5 +1,10 @@ 2006-06-27 Brian Matherly * src/GampsLogger/_ErrorReportAssistant.py: fix error message in Windows + * src/plugins/DetDescendantReport.py: remove duplicate birth events + * src/plugins/IndivComplete.py: remove duplicate birth events + * src/plugins/NarrativeWeb.py: remove duplicate birth events (bug #235) + * src/plugins/DetAncestralReport.py: remove duplicate birth events + * src/plugins/FamilyGroup.py: remove duplicate birth events 2006-06-26 Don Allingham * src/ReportBase/_ReportDialog.py (report): catch IOError diff --git a/gramps2/src/plugins/DetAncestralReport.py b/gramps2/src/plugins/DetAncestralReport.py index 2b53f1e4c..d371074ef 100644 --- a/gramps2/src/plugins/DetAncestralReport.py +++ b/gramps2/src/plugins/DetAncestralReport.py @@ -291,7 +291,11 @@ class DetAncestorReport(Report): self.doc.end_paragraph() if self.includeEvents: + birth_ref = person.get_birth_ref() + death_ref = person.get_death_ref() for event_ref in person.get_event_ref_list(): + if event_ref == birth_ref or event_ref == death_ref: + continue event = self.database.get_event_from_handle(event_ref.ref) date = DateHandler.get_date(event) ph = event.get_place_handle() diff --git a/gramps2/src/plugins/DetDescendantReport.py b/gramps2/src/plugins/DetDescendantReport.py index 2620b1513..6a595e049 100644 --- a/gramps2/src/plugins/DetDescendantReport.py +++ b/gramps2/src/plugins/DetDescendantReport.py @@ -321,7 +321,11 @@ class DetDescendantReport(Report): self.doc.end_paragraph() if self.includeEvents: + birth_ref = person.get_birth_ref() + death_ref = person.get_death_ref() for event_ref in person.get_event_ref_list(): + if event_ref == birth_ref or event_ref == death_ref: + continue event = self.database.get_event_from_handle(event_ref.ref) date = DateHandler.get_date(event) ename = str( event.get_type() ) diff --git a/gramps2/src/plugins/FamilyGroup.py b/gramps2/src/plugins/FamilyGroup.py index 8fd6fa6ae..274bbaf8a 100644 --- a/gramps2/src/plugins/FamilyGroup.py +++ b/gramps2/src/plugins/FamilyGroup.py @@ -333,10 +333,11 @@ class FamilyGroup(Report): if self.incParEvents: for event_ref in person.get_event_ref_list(): - event = self.database.get_event_from_handle(event_ref.ref) - evtType = event.get_type() - name = str( evtType ) - self.dump_parent_event(name,event) + if event_ref != birth_ref and event_ref != death_ref: + event = self.database.get_event_from_handle(event_ref.ref) + evtType = event.get_type() + name = str( evtType ) + self.dump_parent_event(name,event) if self.incParAddr: addrlist = person.get_address_list()[:] diff --git a/gramps2/src/plugins/IndivComplete.py b/gramps2/src/plugins/IndivComplete.py index 33a472442..1a6a80d32 100644 --- a/gramps2/src/plugins/IndivComplete.py +++ b/gramps2/src/plugins/IndivComplete.py @@ -377,9 +377,7 @@ class IndivCompleteReport(Report): self.doc.end_cell() self.doc.end_row() - event_ref_list = [ self.start_person.get_birth_ref(), \ - self.start_person.get_death_ref() ] + \ - self.start_person.get_event_ref_list() + event_ref_list = self.start_person.get_event_ref_list() for event_ref in event_ref_list: if event_ref: event = self.database.get_event_from_handle(event_ref.ref) diff --git a/gramps2/src/plugins/NarrativeWeb.py b/gramps2/src/plugins/NarrativeWeb.py index 03b9acfdf..c19b08a6e 100644 --- a/gramps2/src/plugins/NarrativeWeb.py +++ b/gramps2/src/plugins/NarrativeWeb.py @@ -1665,14 +1665,15 @@ class IndividualPage(BasePage): of.write('\n') for event_ref in evt_ref_list: - event = self.db.get_event_from_handle(event_ref.ref) - if event: - evt_name = str(event.get_type()) - of.write('%s\n' % evt_name) - of.write('\n') - of.write(self.format_event(event)) - of.write('\n') - of.write('\n') + if event_ref != birth_ref and event_ref != death_ref: + event = self.db.get_event_from_handle(event_ref.ref) + if event: + evt_name = str(event.get_type()) + of.write('%s\n' % evt_name) + of.write('\n') + of.write(self.format_event(event)) + of.write('\n') + of.write('\n') of.write('\n') of.write('\n')