Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit ec7854c

Browse files
committed
fixed crash in RTL evaluation in editor elements
1 parent 3cce275 commit ec7854c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

UI/Components/EditorElement/EditorElement.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ public EditorElement(string filePath)
214214
private void Editor_Loaded(object sender, RoutedEventArgs e)
215215
{
216216
ParseIncludes(sender, e);
217+
EvaluateRTL();
217218
}
218219

219220
public void Editor_TabClosed(object sender, CancelEventArgs e)
@@ -1032,6 +1033,11 @@ public void Language_Translate(bool Initial = false)
10321033
}
10331034
}
10341035

1036+
public void EvaluateRTL()
1037+
{
1038+
TooltipGrid.FlowDirection = FlowDirection.LeftToRight;
1039+
}
1040+
10351041
#endregion
10361042
}
10371043
}

UI/MainWindow/MainWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ public void RestoreMainWindow()
595595
public void EvaluateRTL()
596596
{
597597
FlowDirection = Program.IsRTL ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
598-
GetAllEditorElements().ForEach(x => x.TooltipGrid.FlowDirection = FlowDirection.LeftToRight);
598+
GetAllEditorElements()?.ForEach(x => x.EvaluateRTL());
599599
}
600600
#endregion
601601
}

0 commit comments

Comments
 (0)