1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-21 01:36:03 +08:00

[FIX] Copy & Paste in node's TextField

This commit is contained in:
ZLX 2021-02-15 17:02:48 +08:00
parent 75ee5d47ff
commit 0f84990968

View File

@ -337,12 +337,16 @@ namespace XNodeEditor {
if (e.type == EventType.ExecuteCommand) DuplicateSelectedNodes(); if (e.type == EventType.ExecuteCommand) DuplicateSelectedNodes();
e.Use(); e.Use();
} else if (e.commandName == "Copy") { } else if (e.commandName == "Copy") {
if (!EditorGUIUtility.editingTextField) {
if (e.type == EventType.ExecuteCommand) CopySelectedNodes(); if (e.type == EventType.ExecuteCommand) CopySelectedNodes();
e.Use(); e.Use();
}
} else if (e.commandName == "Paste") { } else if (e.commandName == "Paste") {
if (!EditorGUIUtility.editingTextField) {
if (e.type == EventType.ExecuteCommand) PasteNodes(WindowToGridPosition(lastMousePosition)); if (e.type == EventType.ExecuteCommand) PasteNodes(WindowToGridPosition(lastMousePosition));
e.Use(); e.Use();
} }
}
Repaint(); Repaint();
break; break;
case EventType.Ignore: case EventType.Ignore: