Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Src/LexText/Interlinear/SandboxBase.SandboxVc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,14 @@ 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);
}
Expand Down
9 changes: 8 additions & 1 deletion Src/LexText/Interlinear/SandboxBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,11 @@ public bool UsingGuess
get; set;
}

public bool UsingWordCatGuess
{
get; set;
}

/// <summary>
/// Indicates the direction of flow of baseline that Sandbox is in.
/// (Only available after MakeRoot)
Expand Down Expand Up @@ -1581,6 +1586,7 @@ protected virtual int CopyLexPosToWordPos(bool fCopyToWordCat, int hvoMsaPos)
int hvoSbWordPos = m_caches.DataAccess.get_ObjectProp(RootWordHvo, ktagSbWordPos);
m_caches.DataAccess.SetObjProp(RootWordHvo, ktagSbWordPos, hvoPos);
m_caches.DataAccess.SetInt(hvoPos, ktagSbNamedObjGuess, 1);
UsingWordCatGuess = true;
m_caches.DataAccess.PropChanged(RootBox, (int)PropChangeType.kpctNotifyAll, RootWordHvo,
ktagSbWordPos, 0, 1, (hvoSbWordPos == 0 ? 0 : 1));
}
Expand Down Expand Up @@ -4045,7 +4051,7 @@ internal void ClearAllGlosses()
/// <returns></returns>
public bool ShouldSave(bool fSaveGuess)
{
return m_caches.DataAccess.IsDirty() || (fSaveGuess && UsingGuess);
return m_caches.DataAccess.IsDirty() || (fSaveGuess && (UsingGuess || UsingWordCatGuess));
}

/// <summary>
Expand All @@ -4064,6 +4070,7 @@ public AnalysisTree GetRealAnalysis(bool fSaveGuess, out IWfiAnalysis obsoleteAn
CurrentAnalysisTree.Analysis = analMethod.Run();
obsoleteAna = analMethod.ObsoleteAnalysis;
UsingGuess = false;
UsingWordCatGuess = false;
MarkAsInitialState();
}
return CurrentAnalysisTree;
Expand Down
Loading