summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavi Rodriguez <jrodriguezdev@gmail.com>2024-06-21 19:13:43 -0400
committerJavi Rodriguez <jrodriguezdev@gmail.com>2024-06-21 19:13:43 -0400
commitd6e17b8a0d0cd6702ea787fa9e93ca8acfe0b971 (patch)
tree12601c14afcc4cddd732933464b324420caf3733
parent8a6c1e8f5232ff3b3a5eac024d590e7479b29e90 (diff)
downloadredot-engine-d6e17b8a0d0cd6702ea787fa9e93ca8acfe0b971.tar.gz
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
-rw-r--r--scene/gui/flow_container.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/flow_container.cpp b/scene/gui/flow_container.cpp
index ceffd9d103..f77d66fe98 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;