Skip to content

Commit 7481ccc

Browse files
authored
Fix LT-22155: Merge entry/sense losing some custom fields (#340)
1 parent 7b63718 commit 7481ccc

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/SIL.LCModel/DomainImpl/CmObject.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -833,9 +833,16 @@ public void MergeSelectedPropertiesOfObject(ICmObject objSrc, bool fLoseNoString
833833
myCurrentValue = new MultiStringAccessor(this, flid);
834834
srcCurrentValue = new MultiStringAccessor(objSrc, flid);
835835
break;
836-
case (int)CellarPropertyType.MultiUnicode:
837-
myCurrentValue = new MultiUnicodeAccessor(this, flid);
838-
srcCurrentValue = new MultiUnicodeAccessor(objSrc, flid);
836+
case (int)CellarPropertyType.OwningAtomic:
837+
case (int)CellarPropertyType.ReferenceAtomic:
838+
int myHvo = m_cache.DomainDataByFlid.get_ObjectProp(Hvo, flid);
839+
int srcHvo = m_cache.DomainDataByFlid.get_ObjectProp(objSrc.Hvo, flid);
840+
myCurrentValue = m_cache.GetAtomicPropObject(myHvo);
841+
srcCurrentValue = m_cache.GetAtomicPropObject(srcHvo);
842+
break;
843+
default:
844+
myCurrentValue = this.GetCustomPropertyForSDA(flid);
845+
srcCurrentValue = ((CmObject)objSrc).GetCustomPropertyForSDA(flid);
839846
break;
840847
}
841848
}

0 commit comments

Comments
 (0)