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

Merge pull request #47 from nostek/bugfix/losefocus

This function releases the focus of text fields and dropdowns.
This commit is contained in:
Thor Brigsted 2018-06-20 12:18:21 +02:00 committed by GitHub
commit 4b274df205
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,12 +207,7 @@ namespace XNodeEditor {
} else if (!IsHoveringNode) {
// If click outside node, release field focus
if (!isPanning) {
// I've got no idea which of these do what, so we'll just reset all of it.
GUIUtility.hotControl = 0;
GUIUtility.keyboardControl = 0;
EditorGUIUtility.editingTextField = false;
EditorGUIUtility.keyboardControl = 0;
EditorGUIUtility.hotControl = 0;
EditorGUI.FocusTextInControl(null);
}
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
}