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

Merge pull request #309 from IIzzaya/master

[FIX] Copy & Paste in node's TextField
This commit is contained in:
Thor Brigsted 2021-02-17 08:36:49 +01:00 committed by GitHub
commit 5b42d2caeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,11 +337,15 @@ 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 (e.type == EventType.ExecuteCommand) CopySelectedNodes(); if (!EditorGUIUtility.editingTextField) {
e.Use(); if (e.type == EventType.ExecuteCommand) CopySelectedNodes();
e.Use();
}
} else if (e.commandName == "Paste") { } else if (e.commandName == "Paste") {
if (e.type == EventType.ExecuteCommand) PasteNodes(WindowToGridPosition(lastMousePosition)); if (!EditorGUIUtility.editingTextField) {
e.Use(); if (e.type == EventType.ExecuteCommand) PasteNodes(WindowToGridPosition(lastMousePosition));
e.Use();
}
} }
Repaint(); Repaint();
break; break;