Skip to content

Commit

Permalink
Minor bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Serg-Norseman committed Jan 13, 2025
1 parent da9a4c5 commit 8300599
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions projects/GKCore/GDModel/GDMCustomEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ public string Cause
set { fCause = value; }
}

/// <summary>
/// Tag "TYPE" (GEDCOM 5.5.1 Specification).
/// </summary>
public string Classification
{
get { return fClassification; }
Expand Down
6 changes: 3 additions & 3 deletions projects/GKCore/GDModel/Providers/GEDCOM/GEDCOMChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);
}

Expand Down

0 comments on commit 8300599

Please sign in to comment.