Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit c763ec9

Browse files
committed
Fixed refresh issue with context menu actions in the curve editor
1 parent 2ae61e5 commit c763ec9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

PostProcessing/Editor/Utils/CurveEditor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ public void SetKeyframe(SerializedProperty curve, int keyframeIndex, Keyframe ke
229229

230230
public bool OnGUI(Rect rect)
231231
{
232-
m_Dirty = false;
232+
if (Event.current.type == EventType.Repaint)
233+
m_Dirty = false;
233234

234235
GUI.BeginClip(rect);
235236
{
@@ -646,6 +647,8 @@ void ContextMenuAddKey(Vector3 hit, bool createOnCurve)
646647

647648
if (serializedObject != null)
648649
serializedObject.ApplyModifiedProperties();
650+
651+
Invalidate();
649652
}
650653

651654
void EditCreateKeyframe(AnimationCurve curve, Vector3 position, bool createOnCurve, float zeroKeyConstantValue)

0 commit comments

Comments
 (0)