fix: address re-entrancy in ReplaceChild and invalid split in AddDocument
This commit is contained in:
@@ -105,7 +105,7 @@ public abstract class DockContainer : DockModule
|
|||||||
throw new ArgumentException("newChild is already in this container", nameof(newChild));
|
throw new ArgumentException("newChild is already in this container", nameof(newChild));
|
||||||
}
|
}
|
||||||
|
|
||||||
newChild.Owner?.RemoveChild(newChild);
|
newChild.Owner?.RemoveChildInternal(newChild, false);
|
||||||
|
|
||||||
// Remove oldChild without triggering cleanup
|
// Remove oldChild without triggering cleanup
|
||||||
_isCleaningUp = true;
|
_isCleaningUp = true;
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public class DockingLayout : Control
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target == DockTarget.Center)
|
if (target == DockTarget.Center || targetGroup.Children.Count == 0)
|
||||||
{
|
{
|
||||||
targetGroup.AddChild(document);
|
targetGroup.AddChild(document);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user