fix(docking): improve root cleanup and simplify DockPanel cleanup logic

This commit is contained in:
2026-03-28 23:05:23 +09:00
parent c8f24edfd8
commit 0d8bc6f868
2 changed files with 13 additions and 11 deletions

View File

@@ -46,15 +46,9 @@ public class DockPanel : DockContainer
protected override void CheckCleanup()
{
if (Children.Count == 0)
{
if (Root != null && Root.RootModule == this)
{
Root.NotifyLayoutEmpty();
}
base.CheckCleanup();
}
else if (Children.Count == 1)
base.CheckCleanup();
if (Children.Count == 1)
{
var child = Children[0];
var owner = Owner;