private void N_OnOutputRemovedFromNode(Node n, NodeOutput inp) { var uinp = OutputNodes.Find(m => m.Output == inp); if (uinp != null) { OutputStack.Children.Remove(uinp); OutputNodes.Remove(uinp); } ResizeHeight(); }
private void N_OnOutputRemovedFromNode(Node n, NodeOutput inp, NodeOutput previous = null) { var uinp = OutputNodes.Find(m => m.Output == inp); if (uinp != null) { //whoops forgot to dispose //on the uinodepoint to remove previous connects //etc uinp.Dispose(); OutputStack.Children.Remove(uinp); OutputNodes.Remove(uinp); } }
protected void RemoveNode(BaseNode node) { node.Disconnect(); node.OnConnected -= OnNodeConnected; node.OnDisconnect -= OnNodeDisconnected; if (node is BaseOutputNode) { OutputNodes.Remove((BaseOutputNode)node); } else { InputNodes.Remove((BaseInputNode)node); } OnNodeRemoved?.Invoke(this, node); }
public virtual void Remove(Node n) { if (n is OutputNode) { OutputNodes.Remove(n.Id); } else if (n is InputNode) { InputNodes.Remove(n.Id); } NodeLookup.Remove(n.Id); if (Nodes.Remove(n)) { n.OnUpdate -= N_OnUpdate; } n.Dispose(); }