🐛 Fix regression on auto-width

This commit is contained in:
Elena Torro 2026-05-14 13:32:31 +02:00 committed by Alejandro Alonso
parent 009e505ba1
commit b13aedb231

View File

@ -929,14 +929,17 @@ impl TextContent {
match self.grow_type() {
GrowType::AutoHeight => {
let result = self.text_layout_auto_height();
self.layout_width = Some(result.2.width);
self.set_layout_from_result(result, selrect.width(), selrect.height());
}
GrowType::AutoWidth => {
let result = self.text_layout_auto_width();
self.layout_width = Some(result.2.width);
self.set_layout_from_result(result, selrect.width(), selrect.height());
}
GrowType::Fixed => {
let result = self.text_layout_fixed();
self.layout_width = Some(result.2.width);
self.set_layout_from_result(result, selrect.width(), selrect.height());
}
}
@ -949,8 +952,6 @@ impl TextContent {
}
self.layout_version = self.content_version;
self.layout_width = Some(selrect.width());
self.size
}