From ae996a1e32f8039e33e7d3929148d92ac82baf3a Mon Sep 17 00:00:00 2001 From: John Maxwell Date: Wed, 8 Jul 2026 08:48:10 -0700 Subject: [PATCH 1/3] Fix LT-22606: Word Cat has tan background when bundle selected --- Src/LexText/Interlinear/SandboxBase.SandboxVc.cs | 8 -------- Src/LexText/Interlinear/SandboxBase.cs | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) 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..2038074b6f 100644 --- a/Src/LexText/Interlinear/SandboxBase.cs +++ b/Src/LexText/Interlinear/SandboxBase.cs @@ -1461,7 +1461,7 @@ internal void CopyLexEntryInfoToMonomorphemicWordGlossAndPos() 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. From 5865b5b94130214622c8054b6ff64207fda80def Mon Sep 17 00:00:00 2001 From: John Maxwell Date: Wed, 8 Jul 2026 10:29:52 -0700 Subject: [PATCH 2/3] Use passed-in usingGuess instead of stale UsingGuess --- Src/LexText/Interlinear/SandboxBase.ComboHandlers.cs | 2 +- Src/LexText/Interlinear/SandboxBase.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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.cs b/Src/LexText/Interlinear/SandboxBase.cs index 2038074b6f..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(UsingGuess && !fHasApprovedWordGloss, UsingGuess && !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. From 5d5844fa24e4ea98c9241255ab80421f2ef01b88 Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Wed, 8 Jul 2026 14:58:44 -0700 Subject: [PATCH 3/3] Revert HandleTab test expectations to pre-LT-20848 values Not guessing the word cat for user-approved analyses restores the pre-LT-20848 tab behavior: the Nihimbilira test data is an approved analysis with no category, so tabbing to the word cat line lands on the plain dropdown icon (ktagWordPosIcon) again. Revert the two assertions that LT-20848 had updated for the auto-filled category. Co-Authored-By: Claude Fable 5 --- Src/LexText/Interlinear/ITextDllTests/SandboxBaseTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);