From 1b7c2a1428273f2a149f30acba2ce066f4b9a8c5 Mon Sep 17 00:00:00 2001 From: Lynx Date: Fri, 28 May 2021 20:42:54 +0200 Subject: [PATCH] Fix not updating fonts when parent theme changes Reparsing the bbcode content when we receieve a theme changed notification just like we already do in ENTER_TREE. Resolves #49089 --- scene/gui/rich_text_label.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 9d4c5973769..ba0b9d1be84 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -959,6 +959,7 @@ void RichTextLabel::_notification(int p_what) { update(); } break; + case NOTIFICATION_THEME_CHANGED: case NOTIFICATION_ENTER_TREE: { if (bbcode != "") { set_bbcode(bbcode); @@ -967,10 +968,6 @@ void RichTextLabel::_notification(int p_what) { main->first_invalid_line = 0; //invalidate ALL update(); - } break; - case NOTIFICATION_THEME_CHANGED: { - update(); - } break; case NOTIFICATION_DRAW: { _validate_line_caches(main);