Fix RichTextLabel discards appended BBCode text on window resize when using DynamicFont

This commit is contained in:
OsakiTsukiko 2023-01-03 17:48:12 +02:00 committed by Rémi Verschelde
parent 0f10eafb38
commit 0a386084bc
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1016,20 +1016,17 @@ void RichTextLabel::_notification(int p_what) {
update();
}
} break;
case NOTIFICATION_RESIZED: {
case NOTIFICATION_RESIZED:
case NOTIFICATION_THEME_CHANGED: {
main->first_invalid_line = 0; //invalidate ALL
update();
} break;
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_ENTER_TREE: {
if (bbcode != "") {
set_bbcode(bbcode);
}
main->first_invalid_line = 0; //invalidate ALL
update();
} break;
case NOTIFICATION_DRAW: {
_validate_line_caches(main);