fix(dock): refactor mutation logic and fix AddChild regression

This commit is contained in:
2026-03-28 14:54:40 +09:00
parent 231756006e
commit e69e071ce2
3 changed files with 99 additions and 120 deletions

View File

@@ -39,6 +39,7 @@ public partial class DockGroupNode : DockNode
/// <exception cref="InvalidOperationException">Thrown if adding the node would create a cycle or if adding self.</exception>
public void AddChild(DockNode node)
{
if (_children.Contains(node)) return;
InsertChild(_children.Count, node);
}