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.
This commit is contained in:
@ -1772,7 +1772,7 @@ void Control::_size_changed() {
|
||||
}
|
||||
}
|
||||
|
||||
if (pos_changed && !size_changed) {
|
||||
if (pos_changed && !approx_size_changed) {
|
||||
_update_canvas_item_transform();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user