From 64e5ea93a067642428db26cf2e047d1156bd6e33 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Wed, 13 Aug 2025 14:32:23 +0200 Subject: [PATCH] :bug: Fix extrect invalidation for texts --- render-wasm/src/shapes.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/render-wasm/src/shapes.rs b/render-wasm/src/shapes.rs index fbdf9c01c4..1af6f24419 100644 --- a/render-wasm/src/shapes.rs +++ b/render-wasm/src/shapes.rs @@ -951,6 +951,7 @@ impl Shape { } pub fn add_paragraph(&mut self, paragraph: Paragraph) -> Result<(), String> { + self.invalidate_extrect(); match self.shape_type { Type::Text(ref mut text) => { text.add_paragraph(paragraph); @@ -961,6 +962,7 @@ impl Shape { } pub fn clear_text(&mut self) { + self.invalidate_extrect(); if let Type::Text(old_text_content) = &self.shape_type { let new_text_content = TextContent::new(self.selrect, old_text_content.grow_type()); self.shape_type = Type::Text(new_text_content);