From 0f84990968746ca638fbf2400dd92c0f6fac7e58 Mon Sep 17 00:00:00 2001 From: ZLX Date: Mon, 15 Feb 2021 17:02:48 +0800 Subject: [PATCH] [FIX] Copy & Paste in node's TextField --- Scripts/Editor/NodeEditorAction.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Scripts/Editor/NodeEditorAction.cs b/Scripts/Editor/NodeEditorAction.cs index 21c0612..b7fb3b4 100644 --- a/Scripts/Editor/NodeEditorAction.cs +++ b/Scripts/Editor/NodeEditorAction.cs @@ -337,11 +337,15 @@ namespace XNodeEditor { if (e.type == EventType.ExecuteCommand) DuplicateSelectedNodes(); e.Use(); } else if (e.commandName == "Copy") { - if (e.type == EventType.ExecuteCommand) CopySelectedNodes(); - e.Use(); + if (!EditorGUIUtility.editingTextField) { + if (e.type == EventType.ExecuteCommand) CopySelectedNodes(); + e.Use(); + } } else if (e.commandName == "Paste") { - if (e.type == EventType.ExecuteCommand) PasteNodes(WindowToGridPosition(lastMousePosition)); - e.Use(); + if (!EditorGUIUtility.editingTextField) { + if (e.type == EventType.ExecuteCommand) PasteNodes(WindowToGridPosition(lastMousePosition)); + e.Use(); + } } Repaint(); break;