Fixed dropping of notes

svn: r222
This commit is contained in:
Don Allingham 2001-07-03 22:37:00 +00:00
parent 1c3189a806
commit 24f930f171

View File

@ -307,8 +307,8 @@ class GrampsParser(handler.ContentHandler):
#--------------------------------------------------------------------- #---------------------------------------------------------------------
def start_sourceref(self,attrs): def start_sourceref(self,attrs):
self.source_ref = SourceRef() self.source_ref = SourceRef()
self.source = self.db.findSourceNoMap(u2l(attrs["ref"])) source = self.db.findSourceNoMap(u2l(attrs["ref"]))
self.source_ref.setBase(self.source) self.source_ref.setBase(source)
if self.address: if self.address:
self.address.setSourceRef(self.source_ref) self.address.setSourceRef(self.source_ref)
elif self.name: elif self.name:
@ -648,20 +648,34 @@ class GrampsParser(handler.ContentHandler):
note = fix_spaces(self.note_list) note = fix_spaces(self.note_list)
else: else:
note = u2l(tag) note = u2l(tag)
print note
if self.address: if self.address:
self.address.setNote(note) self.address.setNote(note)
print "Address"
elif self.attribute: elif self.attribute:
self.attribute.setNote(note) self.attribute.setNote(note)
print "Attribute"
elif self.name: elif self.name:
self.name.setNote(note) self.name.setNote(note)
print "Name"
elif self.source: elif self.source:
self.source.setNote(note) self.source.setNote(note)
print "source"
elif self.event: elif self.event:
self.event.setNote(note) self.event.setNote(note)
print "event"
elif self.person: elif self.person:
print self.person.getPrimaryName().getName()
print "-------------------------------------"
print note
self.person.setNote(note) self.person.setNote(note)
elif self.family: elif self.family:
self.family.setNote(note) self.family.setNote(note)
print "Family"
else:
print "Ignored"
self.note_list = [] self.note_list = []
#--------------------------------------------------------------------- #---------------------------------------------------------------------