Merge pull request #9633 from penpot/elenatorro-fix-auto-width

🐛 Fix regression on auto-width
This commit is contained in:
Alejandro Alonso 2026-05-14 14:01:19 +02:00 committed by GitHub
commit 134391bc3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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
}