private bool MoveSubItem(NodeViewData sourceNvd, NodeViewData targetNvd, NodeViewData.SubItemAttachment sourceAttachment, NodeViewData.SubItemAttachment targetAttachment, bool insertPreviously, bool isCopied) { if (sourceNvd != null && targetNvd != null && sourceAttachment != null && sourceNvd.SetSubItem(targetNvd, sourceAttachment, targetAttachment, insertPreviously, isCopied)) { // set the prefab dirty for the node if (!string.IsNullOrEmpty(sourceNvd.Node.PrefabName)) { sourceNvd.Node.HasOwnPrefabData = true; } if (!string.IsNullOrEmpty(targetNvd.Node.PrefabName)) { targetNvd.Node.HasOwnPrefabData = true; } SelectedNode = targetNvd; // call the ClickEvent event handler if (ClickEvent != null) { ClickEvent(SelectedNode); } UndoManager.Save(this.RootNode); LayoutChanged(); return true; } return false; }
private bool MoveSubItem(NodeViewData nvd, NodeViewData.SubItemAttachment sourceAttachment, NodeViewData.SubItemAttachment targetAttachment, bool insertPreviously) { if (nvd != null && sourceAttachment != null && targetAttachment != null && nvd.SetSubItem(nvd, targetAttachment, sourceAttachment, insertPreviously)) { // set the prefab dirty for the current node if (!string.IsNullOrEmpty(nvd.Node.PrefabName)) { nvd.Node.HasOwnPrefabData = true; } UndoManager.Save(this.RootNode, nvd.Node.Behavior); return true; } return false; }