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