-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed bug in group creation logic that could lead to properties bei…
…ng part of groups because their names were similar - Fixed error when using undo after a node was deleted - Removed old keydown recognition system - fixed a visibility related null ref in GraphModelEditor - removed faulty isExpanded property from foldouts (they are just claused on default now) - fixed HasSelectedEdges check that worked with the wrong field - fixed long foldout label that prevented node dragging
- Loading branch information
1 parent
ee69b15
commit c5db61c
Showing
13 changed files
with
134 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
/// <summary> | ||
/// Thanks to https://forum.unity.com/threads/4-6-editorapplication-modifierkeyschanged-how-to-find-out-which-key-was-pressed.357367/#post-2705846 | ||
/// </summary> | ||
public static class GlobalKeyEventHandler { | ||
public static event Action<Event> OnKeyEvent; | ||
public static bool RegistrationSucceeded = false; | ||
|
||
static GlobalKeyEventHandler() { | ||
RegistrationSucceeded = false; | ||
string msg = ""; | ||
try { | ||
System.Reflection.FieldInfo info = typeof(EditorApplication).GetField("globalEventHandler", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic); | ||
if (info != null) { | ||
EditorApplication.CallbackFunction value = (EditorApplication.CallbackFunction)info.GetValue(null); | ||
|
||
value -= onKeyPressed; | ||
value += onKeyPressed; | ||
|
||
info.SetValue(null, value); | ||
|
||
RegistrationSucceeded = true; | ||
} else { | ||
msg = "globalEventHandler not found"; | ||
} | ||
} catch (Exception e) { | ||
msg = e.Message; | ||
} finally { | ||
if (!RegistrationSucceeded) { | ||
Debug.LogWarning("GlobalKeyEventHandler: error while registering for globalEventHandler: " + msg); | ||
} | ||
} | ||
} | ||
|
||
private static void onKeyPressed() { | ||
OnKeyEvent?.Invoke(Event.current); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters