From 8e70966c80d27abc599cffbf3eaf55c5a1b6b9b0 Mon Sep 17 00:00:00 2001 From: Jake Oliver Date: Fri, 26 Apr 2024 17:34:13 -0400 Subject: [PATCH] Dispose of FocusBox if it exists --- Src/LexText/Interlinear/InterlinDocForAnalysis.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Src/LexText/Interlinear/InterlinDocForAnalysis.cs b/Src/LexText/Interlinear/InterlinDocForAnalysis.cs index 30fe801fa4..8cd44701cf 100644 --- a/Src/LexText/Interlinear/InterlinDocForAnalysis.cs +++ b/Src/LexText/Interlinear/InterlinDocForAnalysis.cs @@ -1852,6 +1852,11 @@ internal FocusBoxController FocusBox internal override void CreateFocusBox() { + if (ExistingFocusBox != null) + { + ExistingFocusBox.Dispose(); + } + ExistingFocusBox = CreateFocusBoxInternal(); }