Skip to content

Commit 3cce58e

Browse files
committed
This fixes LT-22541.
1 parent bbc3134 commit 3cce58e

2 files changed

Lines changed: 19 additions & 7 deletions

File tree

‎Src/LexText/Interlinear/SandboxBase.cs‎

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,17 +1658,30 @@ private int CreateSecondaryAndCopyStrings(int flidChoices, int hvoMain, int flid
16581658

16591659
publicvoidUpdateField(inthvo,intflid)
16601660
{
1661-
inthvoMorph=GetHvoMorphForLexSense(hvo);
1662-
if(hvoMorph!=0)
1661+
ICmObjecthvoObject=Caches.MainCache.ServiceLocator.GetInstance<ICmObjectRepository>().GetObject(hvo);
1662+
if(hvoObjectisILexSenselexSense)
16631663
{
1664-
ILexSenselexSense=Caches.MainCache.ServiceLocator.GetInstance<ILexSenseRepository>().GetObject(hvo);
1665-
ILexEntrylexEntry=lexSense?.OwnerasILexEntry;
1666-
if(lexSense!=null&&lexEntry!=null)
1664+
inthvoMorph=GetHvoMorphForLexSense(hvo);
1665+
if(hvoMorph!=0&&lexSense.OwnerisILexEntrylexEntry)
16671666
{
16681667
// This fixes LT-22534.
16691668
EstablishDefaultSense(hvoMorph,lexEntry,lexSense,null);
16701669
}
1671-
1670+
}
1671+
if(hvoObject!=null&&hvoObject.OwnerisIMoMorphSynAnalysismsa)
1672+
{
1673+
if(msa.OwnerisILexEntrylexEntry)
1674+
{
1675+
foreach(varsenseinlexEntry.SensesOS)
1676+
{
1677+
inthvoMorph=GetHvoMorphForLexSense(sense.Hvo);
1678+
if(hvoMorph!=0&&sense.MorphoSyntaxAnalysisRA==msa)
1679+
{
1680+
// This fixes LT-22541.
1681+
EstablishDefaultSense(hvoMorph,lexEntry,sense,null);
1682+
}
1683+
}
1684+
}
16721685
}
16731686
}
16741687

‎Src/xWorks/PopupToolWindow.cs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
usingSIL.FieldWorks.Common.FwUtils;
21
usingSIL.FieldWorks.Common.RootSites;
32
usingSIL.LCModel;
43
usingSIL.Utils;

0 commit comments

Comments
 (0)