2006-05-23 Alex Roitman <shura@gramps-project.org>

* src/GrampsDb/_ReadXML.py (start_eventref): Do not reset existing
	birth/deat reference.



svn: r6758
This commit is contained in:
Alex Roitman 2006-05-23 17:02:06 +00:00
parent ba37224b38
commit b0e5e65046
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2006-05-23 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_ReadXML.py (start_eventref): Do not reset existing
birth/deat reference.
2006-05-23 Don Allingham <don@gramps-project.org> 2006-05-23 Don Allingham <don@gramps-project.org>
* src/DataViews/_FamilyView.py: more shading * src/DataViews/_FamilyView.py: more shading

View File

@ -772,14 +772,15 @@ class GrampsParser(UpdateCallback):
self.family.add_event_ref(self.eventref) self.family.add_event_ref(self.eventref)
elif self.person: elif self.person:
event.personal = True 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 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 self.person.death_ref = self.eventref
else: else:
self.person.add_event_ref(self.eventref) self.person.add_event_ref(self.eventref)
def start_attribute(self,attrs): def start_attribute(self,attrs):
self.attribute = RelLib.Attribute() self.attribute = RelLib.Attribute()
self.attribute.conf = int(attrs.get("conf",2)) self.attribute.conf = int(attrs.get("conf",2))