/// <summary> /// Transfers the child node from current group node to another group node. /// </summary> /// <param name="targetGroup">The target group.</param> /// <param name="node">The node.</param> /// <returns></returns> public bool TransferChildNode(SceneNode node, GroupNodeBase targetGroup) { if (targetGroup == this || !itemHashSet.Remove(node.GUID)) { return(false); } ItemsInternal.Remove(node); node.Parent = null; InvalidateSceneGraph(); ChildNodeRemoved?.Invoke(this, new OnChildNodeChangedArgs(node, Operation.Remove)); return(targetGroup.AddChildNode(node)); }
/// <summary> /// Transfers the node to another group. <see cref="GroupNodeBase.TransferChildNode(SceneNode, GroupNodeBase)"/> /// </summary> /// <param name="item">The item.</param> /// <param name="target">The target.</param> public void TransferNode(SceneNode item, GroupNodeBase target) { GroupNode.TransferChildNode(item, target); }