From 62133630de7308d40b354a16524f94e393d66d0c Mon Sep 17 00:00:00 2001 From: Icarus <1375400884@qq.com> Date: Tue, 3 Dec 2019 20:57:00 +0800 Subject: [PATCH] !TX remove todo --- Scripts/Editor/NodeEditorAction.cs | 6 +----- Scripts/Editor/NodeEditorGUI.cs | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Scripts/Editor/NodeEditorAction.cs b/Scripts/Editor/NodeEditorAction.cs index 47a6a7f..c919c9b 100644 --- a/Scripts/Editor/NodeEditorAction.cs +++ b/Scripts/Editor/NodeEditorAction.cs @@ -207,11 +207,7 @@ namespace XNodeEditor { //If connection is valid, save it if (draggedOutputTarget != null) { XNode.Node node = draggedOutputTarget.node; - if (graph.nodes.Count != 0) - { - //todo Connect Callback 2019.12.3 18点38分 - draggedOutput.Connect(draggedOutputTarget); - } + if (graph.nodes.Count != 0) draggedOutput.Connect(draggedOutputTarget); // ConnectionIndex can be -1 if the connection is removed instantly after creation int connectionIndex = draggedOutput.GetConnectionIndex(draggedOutputTarget); diff --git a/Scripts/Editor/NodeEditorGUI.cs b/Scripts/Editor/NodeEditorGUI.cs index e6359c7..8a3e076 100644 --- a/Scripts/Editor/NodeEditorGUI.cs +++ b/Scripts/Editor/NodeEditorGUI.cs @@ -125,11 +125,7 @@ namespace XNodeEditor { /// Show right-click context menu for hovered port void ShowPortContextMenu(XNode.NodePort hoveredPort) { GenericMenu contextMenu = new GenericMenu(); - contextMenu.AddItem(new GUIContent("Clear Connections"), false, () => - { - //todo Remove Connect Callback 2019.12.3 18点41分 - hoveredPort.ClearConnections(); - }); + contextMenu.AddItem(new GUIContent("Clear Connections"), false, hoveredPort.ClearConnections); if (hoveredPort.IsDynamic) { contextMenu.AddItem(new GUIContent("Remove"), false, () => hoveredPort.node.RemoveDynamicPort(hoveredPort));