From 680c93e6d9f001f03be4ee87e53862cea6a0b2af Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 24 Aug 2004 04:15:23 +0000 Subject: [PATCH] a person is not alive. svn: r3500 --- gramps2/ChangeLog | 2 +- gramps2/src/RelLib.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index c21304a67..332af3e93 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -2,7 +2,7 @@ * src/PeopleModel.py: enhanced column_spouse * src/RelLib.py: enhance probably_alive to check for "Cause of Death", "Burial", and "Cremation" events to indicate that - a person is not alive. + a person is not alive. * src/const.py.in: add support for "Marriage Banns" 2004-08-23 Don Allingham diff --git a/gramps2/src/RelLib.py b/gramps2/src/RelLib.py index ee4e54d6b..3e1c2ad89 100644 --- a/gramps2/src/RelLib.py +++ b/gramps2/src/RelLib.py @@ -543,6 +543,14 @@ class Person(PrimaryObject,SourceNote): """Returns true if the person may be alive.""" if self.death_handle: return False + + # Look for Cause Of Death, Burial or Cremation events. + # These are fairly good indications that someone's not alive. + for ev_handle in self.event_list: + ev = db.get_event_from_handle(ev_handle) + if ev.name in ["Cause Of Death", "Burial", "Cremation"]: + return 0 + if self.birth_handle: birth = db.get_event_from_handle(self.birth_handle) if birth.get_date() != "":