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
This commit is contained in:
Javi Rodriguez 2024-06-21 19:13:43 -04:00
parent 8a6c1e8f52
commit d6e17b8a0d

View File

@ -57,7 +57,7 @@ void FlowContainer::_resort() {
int line_height = 0; int line_height = 0;
int line_length = 0; int line_length = 0;
float line_stretch_ratio_total = 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; int children_in_current_line = 0;
Control *last_child = nullptr; Control *last_child = nullptr;