From eee0ce5a1deca5ba3efd1e169c3cce26102a02ea Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Mon, 29 May 2006 03:00:07 +0000 Subject: [PATCH] * src/GrampsDb/_ReadXML.py (stop_event): Properly import birth and death from the old XML. svn: r6810 --- ChangeLog | 2 ++ src/GrampsDb/_ReadXML.py | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d5210cf6..f14475ab2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ 2006-05-28 Alex Roitman + * src/GrampsDb/_ReadXML.py (stop_event): Properly import birth and + death from the old XML. * src/Editors/_EditFamily.py (EditFamily.save): Typo. * src/plugins/Verify.py: Add double-clicking and mark/unmark/invert. diff --git a/src/GrampsDb/_ReadXML.py b/src/GrampsDb/_ReadXML.py index 713ba024b..5c7484e76 100644 --- a/src/GrampsDb/_ReadXML.py +++ b/src/GrampsDb/_ReadXML.py @@ -1440,15 +1440,15 @@ class GrampsParser(UpdateCallback): ref.ref = self.event.handle ref.private = self.event.private ref.role.set(RelLib.EventRoleType.PRIMARY) - if self.event.type == RelLib.EventType.BIRTH: - self.person.birth_ref = ref - elif self.event.type == RelLib.EventType.DEATH: - self.person.death_ref = ref + if (self.event.type == RelLib.EventType.BIRTH) \ + and (self.person.get_birth_ref() == None): + self.person.set_birth_ref(ref) + elif (self.event.type == RelLib.EventType.DEATH) \ + and (self.person.get_death_ref() == None): + self.person.set_death_ref(ref) else: self.person.add_event_ref(ref) - # FIXME: re-enable when event types are fixed. - if self.event.get_description() == "" and \ self.event.get_type() != RelLib.EventType.CUSTOM: if self.family: