From 5803ae45ba9e5929729254b756a4fa0693f59fd5 Mon Sep 17 00:00:00 2001 From: Thor Brigsted Date: Fri, 16 Nov 2018 14:06:59 +0100 Subject: [PATCH] Revert "Allow to trigger renames via F2 key" --- Scripts/Editor/NodeEditor.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Scripts/Editor/NodeEditor.cs b/Scripts/Editor/NodeEditor.cs index bdcb384..8b06c26 100644 --- a/Scripts/Editor/NodeEditor.cs +++ b/Scripts/Editor/NodeEditor.cs @@ -40,20 +40,9 @@ namespace XNodeEditor { } } else { GUILayout.Label(title, NodeEditorResources.styles.nodeHeader, GUILayout.Height(30)); - if (HasFocus() && IsRenameKeyPressed()) { - InitiateRename(); - } } } - bool HasFocus() { - return Selection.activeObject == this.target; - } - - bool IsRenameKeyPressed() { - return (Event.current != null && Event.current.isKey && Event.current.keyCode == KeyCode.F2); - } - /// Draws standard field editors for all public fields public virtual void OnBodyGUI() { // Unity specifically requires this to save/update any serial object.