From 22e9ff5e3e37c83f4ccff5923646f26682d9ea8a Mon Sep 17 00:00:00 2001 From: shadow-foss Date: Sat, 6 Dec 2025 09:32:16 +0530 Subject: [PATCH] Remove legacy key insertion offset loop Removes the while loop that offset new keys by 0.001s on collision. This makes Insert Key consistent with Duplicate/Paste by overwriting keys. Fixes #111741 --- editor/animation/animation_track_editor.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/editor/animation/animation_track_editor.cpp b/editor/animation/animation_track_editor.cpp index 44ded4d0f1..919b6003b2 100644 --- a/editor/animation/animation_track_editor.cpp +++ b/editor/animation/animation_track_editor.cpp @@ -5925,10 +5925,6 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) { resolve_insertion_offset(p_ofs); - while (animation->track_find_key(p_track, p_ofs, Animation::FIND_MODE_APPROX) != -1) { // Make sure insertion point is valid. - p_ofs += SECOND_DECIMAL; - } - Node *node = root->get_node_or_null(animation->track_get_path(p_track)); if (!node) { EditorNode::get_singleton()->show_warning(TTR("Track path is invalid, so can't add a key."));