diff --git a/projects/GKCore/GDModel/GDMCustomEvent.cs b/projects/GKCore/GDModel/GDMCustomEvent.cs index 42f7abade..a774c70d2 100644 --- a/projects/GKCore/GDModel/GDMCustomEvent.cs +++ b/projects/GKCore/GDModel/GDMCustomEvent.cs @@ -66,6 +66,9 @@ public string Cause set { fCause = value; } } + /// + /// Tag "TYPE" (GEDCOM 5.5.1 Specification). + /// public string Classification { get { return fClassification; } diff --git a/projects/GKCore/GDModel/Providers/GEDCOM/GEDCOMChecker.cs b/projects/GKCore/GDModel/Providers/GEDCOM/GEDCOMChecker.cs index 0692ce2c0..90a33a360 100644 --- a/projects/GKCore/GDModel/Providers/GEDCOM/GEDCOMChecker.cs +++ b/projects/GKCore/GDModel/Providers/GEDCOM/GEDCOMChecker.cs @@ -197,12 +197,12 @@ private void CheckEvent(GDMCustomEvent evt) CheckStructWL(evt); var tagType = (GEDCOMTagType)evt.Id; + string evType = string.IsNullOrEmpty(evt.Classification) ? string.Empty : evt.Classification; switch (fFormat) { // Fix for Family Tree Maker 2008 which exports occupation as generic EVEN events case GEDCOMFormat.FamilyTreeMaker: { - string subtype = evt.Classification.ToLower(); - if (tagType == GEDCOMTagType.EVEN && subtype == "occupation") { + if (tagType == GEDCOMTagType.EVEN && evType.ToLower() == "occupation") { evt.SetName(GEDCOMTagType.OCCU); evt.Classification = string.Empty; } @@ -225,7 +225,7 @@ private void CheckEvent(GDMCustomEvent evt) CheckEventPlace(evt.Place, evt); } - string key = evt.GetTagName() + ":" + evt.Classification; + string key = evt.GetTagName() + ":" + evType; fBaseContext.EventStats.Increment(key); }