소스 검색

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

(cherry picked from commit 1b7c2a1428273f2a149f30acba2ce066f4b9a8c5)
Lynx 4 년 전
부모
커밋
2ce5515762
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 5
      scene/gui/rich_text_label.cpp

+ 1 - 5
scene/gui/rich_text_label.cpp

@@ -965,6 +965,7 @@ void RichTextLabel::_notification(int p_what) {
 			update();
 
 		} break;
+		case NOTIFICATION_THEME_CHANGED:
 		case NOTIFICATION_ENTER_TREE: {
 
 			if (bbcode != "")
@@ -973,11 +974,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: {