From 6c85abf9bc18998fdfcac6caafec128550e8a99d Mon Sep 17 00:00:00 2001 From: Christiaan Bloemendaal Date: Wed, 27 May 2020 14:20:37 +0200 Subject: [PATCH] Fix handles color not being reset to original color (#266) Co-authored-by: Christiaan Bloemendaal --- Scripts/Editor/NodeEditorGUI.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Scripts/Editor/NodeEditorGUI.cs b/Scripts/Editor/NodeEditorGUI.cs index 7c82a126..99cdecf1 100755 --- a/Scripts/Editor/NodeEditorGUI.cs +++ b/Scripts/Editor/NodeEditorGUI.cs @@ -142,6 +142,7 @@ public void DrawNoodle(Gradient gradient, NoodlePath path, NoodleStroke stroke, for (int i = 0; i < gridPoints.Count; ++i) gridPoints[i] = GridToWindowPosition(gridPoints[i]); + Color originalHandlesColor = Handles.color; Handles.color = gradient.Evaluate(0f); int length = gridPoints.Count; switch (path) { @@ -305,6 +306,7 @@ public void DrawNoodle(Gradient gradient, NoodlePath path, NoodleStroke stroke, gridPoints[length - 1] = end; break; } + Handles.color = originalHandlesColor; } /// Draws all connections