From cf8455c52d8056be23cc3cbeb042879fff9e13c9 Mon Sep 17 00:00:00 2001 From: Max Piepenbrink Date: Wed, 16 Apr 2025 23:59:05 -0700 Subject: [PATCH] Fix regression causing jittery canvas transforms This PR https://github.com/godotengine/godot/pull/104451 introduced a tricky regression. Canvas item transforms could risk not being updated for multiple frames due to the conditional on the line in this commit. Before the "approx_pos|size_changed" fix, the transform would get updated incidentally either way. But now there's a gap where (pos_changed && !size_changed) may not be true for a few frames and there's nothing else left to trigger a transform update. The fix is quite simple, for updating the canvas item transform we remain trigger happy around position changes, but respect the approx_size_changed. --- scene/gui/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index bf42325a988..ff52236c0bf 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1772,7 +1772,7 @@ void Control::_size_changed() { } } - if (pos_changed && !size_changed) { + if (pos_changed && !approx_size_changed) { _update_canvas_item_transform(); }