From d6e17b8a0d0cd6702ea787fa9e93ca8acfe0b971 Mon Sep 17 00:00:00 2001 From: Javi Rodriguez Date: Fri, 21 Jun 2024 19:13:43 -0400 Subject: [PATCH] Fix FlowContainer scale from also scaling wrap point When a FlowContainer was scaled, the point at which a line wraps would also be scaled. This would cause a FlowContainer to have lines that did not fit the container. FlowContainer no longer factors its scale when resorting children. Fixes #93439 --- scene/gui/flow_container.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/flow_container.cpp b/scene/gui/flow_container.cpp index ceffd9d103d..f77d66fe98c 100644 --- a/scene/gui/flow_container.cpp +++ b/scene/gui/flow_container.cpp @@ -57,7 +57,7 @@ void FlowContainer::_resort() { int line_height = 0; int line_length = 0; float line_stretch_ratio_total = 0; - int current_container_size = vertical ? get_rect().size.y : get_rect().size.x; + int current_container_size = vertical ? get_size().y : get_size().x; int children_in_current_line = 0; Control *last_child = nullptr;