From b0e5e650467b01c5de06ded7b6562046479f2fbc Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 23 May 2006 17:02:06 +0000 Subject: [PATCH] 2006-05-23 Alex Roitman * src/GrampsDb/_ReadXML.py (start_eventref): Do not reset existing birth/deat reference. svn: r6758 --- gramps2/ChangeLog | 4 ++++ gramps2/src/GrampsDb/_ReadXML.py | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index bbe6dcb5e..5e0ca8e2d 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2006-05-23 Alex Roitman + * src/GrampsDb/_ReadXML.py (start_eventref): Do not reset existing + birth/deat reference. + 2006-05-23 Don Allingham * src/DataViews/_FamilyView.py: more shading diff --git a/gramps2/src/GrampsDb/_ReadXML.py b/gramps2/src/GrampsDb/_ReadXML.py index 0ab044c0c..579a51691 100644 --- a/gramps2/src/GrampsDb/_ReadXML.py +++ b/gramps2/src/GrampsDb/_ReadXML.py @@ -772,13 +772,14 @@ class GrampsParser(UpdateCallback): self.family.add_event_ref(self.eventref) elif self.person: event.personal = True - if event.type == RelLib.EventType.BIRTH: + if (event.type == RelLib.EventType.BIRTH) \ + and (self.person.birth_ref == None): self.person.birth_ref = self.eventref - elif event.type == RelLib.EventType.DEATH: + elif (event.type == RelLib.EventType.DEATH) \ + and (self.person.death_ref == None): self.person.death_ref = self.eventref else: self.person.add_event_ref(self.eventref) - def start_attribute(self,attrs): self.attribute = RelLib.Attribute()