Skip to content
Merged
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
18 changes: 15 additions & 3 deletions Src/LexText/Interlinear/InterlinDocForAnalysis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,18 @@ public virtual void TriggerAnalysisSelected(AnalysisOccurrence target, bool fSav
RecordGuessIfNotKnown(target);
InstallFocusBox();
RootBox.DestroySelection();
FocusBox.SelectOccurrence(target);
SetFocusBoxSizeForVc();
try
{
// Suppress changing the FocusBox when called from VwDrawRootBufferedClass.Create()
// when the selected word has a different RTL from the text (LT-22295).
SuppressChanges = true;
FocusBox.SelectOccurrence(target);
SetFocusBoxSizeForVc();
}
finally
{
SuppressChanges = false;
}
SelectedOccurrence = target;

if (fShow)
Expand Down Expand Up @@ -1835,7 +1845,7 @@ internal FocusBoxController FocusBox
{
get
{
if ((ExistingFocusBox == null && ForEditing) || hasRightToLeftChanged)
if ((ExistingFocusBox == null && ForEditing) || hasRightToLeftChanged && !SuppressChanges)
{
CreateFocusBox();
previousRightToLeft = Vc.RightToLeft;
Expand Down Expand Up @@ -1975,6 +1985,8 @@ public override bool WantInitialSelection
get { return false; }
}

private bool SuppressChanges = false;

protected override void OnMouseDown(MouseEventArgs e)
{
// The base method does this too, but some paths in this method don't go through the base!
Expand Down
Loading