From bd5edcc4d2d2ea7ecfd462d722b4d1a590679511 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 15 Sep 2026 12:55:13 +0200 Subject: [PATCH] Fix minor Editor UI issues --- Source/Editor/Windows/Assets/ModelBaseWindow.cs | 9 ++++++--- Source/Engine/UI/GUI/ContainerControl.cs | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Source/Editor/Windows/Assets/ModelBaseWindow.cs b/Source/Editor/Windows/Assets/ModelBaseWindow.cs index 3046ea43b..89ff1ff96 100644 --- a/Source/Editor/Windows/Assets/ModelBaseWindow.cs +++ b/Source/Editor/Windows/Assets/ModelBaseWindow.cs @@ -117,9 +117,12 @@ namespace FlaxEditor.Windows.Assets public override void OnClean() { - Window._isolateIndex = -1; - Window._highlightIndex = -1; - Window._meshProxy = null; + if (Window != null) + { + Window._isolateIndex = -1; + Window._highlightIndex = -1; + Window._meshProxy = null; + } base.OnClean(); } diff --git a/Source/Engine/UI/GUI/ContainerControl.cs b/Source/Engine/UI/GUI/ContainerControl.cs index aa0078c19..0caca6509 100644 --- a/Source/Engine/UI/GUI/ContainerControl.cs +++ b/Source/Engine/UI/GUI/ContainerControl.cs @@ -171,6 +171,12 @@ namespace FlaxEngine.GUI /// public virtual void DisposeChildren() { + // Steal focus from children to maintain it in a hierarchy + if (ContainsFocus) + { + Focus(); + } + bool wasLayoutLocked = _isLayoutLocked; _isLayoutLocked = true;