From 6c67e7485ee93903dcbb02148e142d29b104554f Mon Sep 17 00:00:00 2001 From: Kamil Jarosz Date: Wed, 22 May 2024 15:02:46 +0200 Subject: [PATCH] core: Invalidate EditText's bitmap when border is disabled This patch makes sure that the bitmap is invalidated not only when a border or background was enabled, but also when both were disabled and the drawing has only been cleared. --- core/src/display_object/edit_text.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/display_object/edit_text.rs b/core/src/display_object/edit_text.rs index a23adbd15..19a40531d 100644 --- a/core/src/display_object/edit_text.rs +++ b/core/src/display_object/edit_text.rs @@ -788,10 +788,10 @@ impl<'gc> EditText<'gc> { .drawing .draw_command(DrawCommand::LineTo(Point::new(width, Twips::ZERO))); write.drawing.draw_command(DrawCommand::LineTo(Point::ZERO)); - - drop(write); - self.invalidate_cached_bitmap(gc_context); } + + drop(write); + self.invalidate_cached_bitmap(gc_context); } /// Internal padding between the bounds of the EditText and the text.