diff --git a/ChangeLog b/ChangeLog index e457920c4..cce6821fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,7 @@ * src/Makefile.am: remove PeopleView.py * src/PeopleView.py: removed, replaced by PersonView * src/PersonView.py: set ellipsize property - * src/GrampsDb/_ReadGedcom.py: fix event handling + * src/GrampsDb/_ReadGedcom.py: fix event handling, fix skip_record 2006-01-21 Don Allingham * src/PeopleModel.py: fix sorting of subnames diff --git a/src/GrampsDb/_ReadGedcom.py b/src/GrampsDb/_ReadGedcom.py index b7f4977ad..93d060883 100644 --- a/src/GrampsDb/_ReadGedcom.py +++ b/src/GrampsDb/_ReadGedcom.py @@ -1517,9 +1517,9 @@ class GedcomParser: etype = event.get_type() if etype[0] == RelLib.Event.CUSTOM: try: - event.set_name((ged2fam[matches[2]],'')) + event.set_type((ged2fam[matches[2]],'')) except: - event.set_name((RelLib.Event.CUSTOM,matches[2])) + event.set_type((RelLib.Event.CUSTOM,matches[2])) else: note = 'Status = %s\n' % matches[2] elif matches[1] == TOKEN_DATE: @@ -2127,7 +2127,13 @@ class GedcomParser: def func_person_attr(self,matches,state): attr = RelLib.Attribute() - attr.set_type(matches[1]) + n = matches[3] + atype = self.gedattr.get(n,RelLib.Attribute.CUSTOM) + if atype == RelLib.Attribute.CUSTOM: + attr.set_type((atype,n)) + else: + attr.set_type((atype,'')) + attr.set_value(matches[2]) state.person.add_attribute(attr) @@ -2245,7 +2251,7 @@ class GedcomParser: sref = self.handle_source(matches,state.level+1) state.name.add_source_reference(sref) - def skip_record(self,matches): + def skip_record(self,matches,state): self.ignore_sub_junk(2) #-------------------------------------------------------------------------