diff --git a/Source/Engine/UI/GUI/ContainerControl.cs b/Source/Engine/UI/GUI/ContainerControl.cs index d5a7e89d3..2de96d0b3 100644 --- a/Source/Engine/UI/GUI/ContainerControl.cs +++ b/Source/Engine/UI/GUI/ContainerControl.cs @@ -709,6 +709,12 @@ namespace FlaxEngine.GUI Focus(); } + // Disable layout + if (!_isLayoutLocked) + { + LockChildrenRecursive(); + } + base.OnDestroy(); // Pass event further