Skip to content

Commit

Permalink
core: Invalidate cached bitmap on EditText hscroll change
Browse files Browse the repository at this point in the history
Changing hscroll may cause the field to display something else,
thus cached bitmap needs to be invalidated.
  • Loading branch information
kjarosh authored and adrian17 committed Dec 16, 2024
1 parent 23837a4 commit 2884192
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/display_object/edit_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,7 @@ impl<'gc> EditText<'gc> {

pub fn set_hscroll(self, hscroll: f64, context: &mut UpdateContext<'gc>) {
self.0.write(context.gc_context).hscroll = hscroll;
self.invalidate_cached_bitmap(context.gc());
}

pub fn scroll(self) -> usize {
Expand Down

0 comments on commit 2884192

Please sign in to comment.