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
10 changes: 10 additions & 0 deletions Src/LexText/Interlinear/FocusBoxController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,16 @@ private void toolTip_Popup(object sender, PopupEventArgs e)
}

}

internal bool ContainsLexEntry(int hvo)
{
Sandbox sandbox = m_sandbox as Sandbox;
if (sandbox != null)
{
return sandbox.LexSensesForCurrentMorphs().Contains(hvo);
}
return false;
}
}

/// <summary>
Expand Down
7 changes: 7 additions & 0 deletions Src/LexText/Interlinear/InterlinDocForAnalysis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ public override void PropChanged(int hvo, int tag, int ivMin, int cvIns, int cvD
MoveFocusBoxIntoPlace();
}
}
if (IsFocusBoxInstalled && FocusBox.SelectedOccurrence != null
&& tag == LexSenseTags.kflidGloss && FocusBox.ContainsLexEntry(hvo))
{
// Somebody changed something in the sandbox. Reset the focus box to reflect the change.
FocusBox.SelectOccurrence(FocusBox.SelectedOccurrence);
MoveFocusBoxIntoPlace();
}
}

protected override void UpdateWordforms(HashSet<IWfiWordform> wordforms)
Expand Down
2 changes: 1 addition & 1 deletion Src/LexText/Interlinear/SandboxBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3937,7 +3937,7 @@ internal int CurrentLexEntriesAnalysis(int hvoMorph)
/// Get's the real lex senses for each current morph.
/// </summary>
/// <returns></returns>
protected List<int> LexSensesForCurrentMorphs()
internal List<int> LexSensesForCurrentMorphs()
{
List<int> lexSensesForMorphs = new List<int>();

Expand Down
Loading