Skip to content

Commit

Permalink
Fix handles color not being reset to original color (#266)
Browse files Browse the repository at this point in the history
Co-authored-by: Christiaan Bloemendaal <[email protected]>
  • Loading branch information
Thundernerd and Christiaan Bloemendaal authored May 27, 2020
1 parent a8daac6 commit 6c85abf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Scripts/Editor/NodeEditorGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -305,6 +306,7 @@ public void DrawNoodle(Gradient gradient, NoodlePath path, NoodleStroke stroke,
gridPoints[length - 1] = end;
break;
}
Handles.color = originalHandlesColor;
}

/// <summary> Draws all connections </summary>
Expand Down

0 comments on commit 6c85abf

Please sign in to comment.