diff --git a/Src/LexText/Interlinear/ITextDllTests/SandboxBaseTests.cs b/Src/LexText/Interlinear/ITextDllTests/SandboxBaseTests.cs index 7daf650258..28ea904ddd 100644 --- a/Src/LexText/Interlinear/ITextDllTests/SandboxBaseTests.cs +++ b/Src/LexText/Interlinear/ITextDllTests/SandboxBaseTests.cs @@ -100,7 +100,7 @@ public void HandleTab() VerifySelection(sandbox, false, SandboxBase.ktagSbWordGloss, 0, -1); // Next the icon on the word cat line. sandbox.HandleTab(false); - VerifySelection(sandbox, true, SandboxBase.ktagSbNamedObjName, SandboxBase.ktagSbWordPos, -1); + VerifySelection(sandbox, true, SandboxBase.ktagWordPosIcon, 0, -1); // Then we wrap around to the start icon on the word line. sandbox.HandleTab(false); VerifySelection(sandbox, true, SandboxBase.ktagAnalysisIcon, 0, -1); @@ -117,7 +117,7 @@ public void HandleTab() sandbox.HandleTab(true); VerifySelection(sandbox, true, SandboxBase.ktagAnalysisIcon, 0, -1); sandbox.HandleTab(true); - VerifySelection(sandbox, true, SandboxBase.ktagSbNamedObjName, SandboxBase.ktagSbWordPos, -1); + VerifySelection(sandbox, true, SandboxBase.ktagWordPosIcon, 0, -1); sandbox.HandleTab(true); VerifySelection(sandbox, false, SandboxBase.ktagSbWordGloss, 0, -1); sandbox.HandleTab(true); diff --git a/Src/LexText/Interlinear/SandboxBase.ComboHandlers.cs b/Src/LexText/Interlinear/SandboxBase.ComboHandlers.cs index 9cd5ad0ff2..1cac7a0310 100644 --- a/Src/LexText/Interlinear/SandboxBase.ComboHandlers.cs +++ b/Src/LexText/Interlinear/SandboxBase.ComboHandlers.cs @@ -1213,7 +1213,7 @@ internal void UpdateMorphBreaks(string sMorphs) MorphemeBreaker mb = new MorphemeBreaker(m_caches, sMorphs, m_hvoSbWord, m_wsVern, m_sandbox); mb.Run(); - m_sandbox.CopyLexEntryInfoToMonomorphemicWordGlossAndPos(); + m_sandbox.CopyLexEntryInfoToMonomorphemicWordGlossAndPos(m_sandbox.UsingGuess); m_rootb.Reconstruct(); // Everything changed, more or less. // We've changed properties that the morph manager cares about, but we don't want it // to fire when we fix the selection. diff --git a/Src/LexText/Interlinear/SandboxBase.SandboxVc.cs b/Src/LexText/Interlinear/SandboxBase.SandboxVc.cs index 7665ff8bee..292501a557 100644 --- a/Src/LexText/Interlinear/SandboxBase.SandboxVc.cs +++ b/Src/LexText/Interlinear/SandboxBase.SandboxVc.cs @@ -550,14 +550,6 @@ private void DisplayWordPOS(IVwEnv vwenv, int hvo, int ws, int choiceIndex) vwenv.set_IntProperty((int)FwTextPropType.ktptEditable, (int)FwTextPropVar.ktpvEnum, (int)TptEditable.ktptNotEditable); - int wordPosHvo = vwenv.DataAccess.get_ObjectProp(hvo, ktagSbWordPos); - if (vwenv.DataAccess.get_IntProp(wordPosHvo, ktagSbNamedObjGuess) == 1) - { - // Show that the word category is guessed. - vwenv.set_IntProperty((int)FwTextPropType.ktptBackColor, - (int)FwTextPropVar.ktpvDefault, - InterlinVc.MachineGuessColor); - } AddOptionalNamedObj(vwenv, hvo, ktagSbWordPos, ktagMissingWordPos, kfragMissingWordPos, ktagWordPosIcon, ws, choiceIndex); } diff --git a/Src/LexText/Interlinear/SandboxBase.cs b/Src/LexText/Interlinear/SandboxBase.cs index 4e581711d6..03791a6611 100644 --- a/Src/LexText/Interlinear/SandboxBase.cs +++ b/Src/LexText/Interlinear/SandboxBase.cs @@ -1412,7 +1412,7 @@ private bool LoadRealDataIntoSec1(int hvoSbWord, bool fLookForDefaults, bool fAd } if (hasMf) // Wait until all of the morphemes have been loaded (cf. LT-22235). - CopyLexEntryInfoToMonomorphemicWordGlossAndPos(); + CopyLexEntryInfoToMonomorphemicWordGlossAndPos(fGuessing != 0); if (bldrError.Length > 0) { var msg = bldrError.ToString().Trim(); @@ -1454,14 +1454,14 @@ private bool LoadRealDataIntoSec1(int hvoSbWord, bool fLookForDefaults, bool fAd return fGuessing != 0; } - internal void CopyLexEntryInfoToMonomorphemicWordGlossAndPos() + internal void CopyLexEntryInfoToMonomorphemicWordGlossAndPos(bool usingGuess) { bool fDirty = Caches.DataAccess.IsDirty(); - bool fApproved = !UsingGuess; + bool fApproved = !usingGuess; bool fHasApprovedWordGloss = HasWordGloss() && (fDirty || fApproved); bool fHasApprovedWordCat = HasWordCat() && (fDirty || fApproved); // conditionally set up the word gloss and POS to correspond to monomorphemic lex morph entry info. - SyncMonomorphemicGlossAndPos(!fHasApprovedWordGloss, !fHasApprovedWordCat); + SyncMonomorphemicGlossAndPos(usingGuess && !fHasApprovedWordGloss, usingGuess && !fHasApprovedWordCat); // Forget we had an existing wordform; otherwise, the program considers // all changes to be editing the wordform, and since it belongs to the // old analysis, the old analysis gets resurrected.