From 59802246b2f40ba4669e0eaa01fa83151eefec47 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 22 Sep 2021 17:09:55 +0200 Subject: [PATCH] Fix adding keyframe to timeline if the value won't change --- Source/Editor/GUI/Timeline/Tracks/CurvePropertyTrack.cs | 2 +- Source/Editor/GUI/Timeline/Tracks/KeyframesPropertyTrack.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Editor/GUI/Timeline/Tracks/CurvePropertyTrack.cs b/Source/Editor/GUI/Timeline/Tracks/CurvePropertyTrack.cs index 18b88f08f..8e885ae64 100644 --- a/Source/Editor/GUI/Timeline/Tracks/CurvePropertyTrack.cs +++ b/Source/Editor/GUI/Timeline/Tracks/CurvePropertyTrack.cs @@ -179,7 +179,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks if (frame == Timeline.CurrentFrame) { // Skip if value is the same - if (kValue == value) + if (Equals(kValue, value)) return; // Update existing key value diff --git a/Source/Editor/GUI/Timeline/Tracks/KeyframesPropertyTrack.cs b/Source/Editor/GUI/Timeline/Tracks/KeyframesPropertyTrack.cs index 1de532c5a..1046e0fa0 100644 --- a/Source/Editor/GUI/Timeline/Tracks/KeyframesPropertyTrack.cs +++ b/Source/Editor/GUI/Timeline/Tracks/KeyframesPropertyTrack.cs @@ -208,7 +208,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks if (frame == Timeline.CurrentFrame) { // Skip if value is the same - if (k.Value == value) + if (Equals(k.Value, value)) return; // Update existing key value