fix(docking): address code quality issues and improve structural integrity

This commit is contained in:
2026-03-28 22:39:57 +09:00
parent 8d3c5ecb1f
commit 35731d4ebe
3 changed files with 25 additions and 5 deletions

View File

@@ -61,8 +61,10 @@ public class DockPanel : DockContainer
}
else if (Root != null && Root.RootPanel == this)
{
// If this is the root panel, we can't easily replace it if the child is a DockGroup,
// because RootPanel must be a DockPanel. So we just leave it.
if (child is DockPanel childPanel)
{
Root.RootPanel = childPanel;
}
}
}
}