From 0a386084bcc6a56a0f362f6a0c29416739136d24 Mon Sep 17 00:00:00 2001 From: OsakiTsukiko Date: Tue, 3 Jan 2023 17:48:12 +0200 Subject: [PATCH] Fix RichTextLabel discards appended BBCode text on window resize when using DynamicFont --- scene/gui/rich_text_label.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index f38f266c7ee..cba1911dbef 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -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);