Просмотр исходного кода

Merge pull request #49174 from NoFr1ends/fix-richtext-theme-update-3

[RichTextLabel] Fix not updating fonts when parent theme changes
Rémi Verschelde 4 лет назад
Родитель
Сommit
7713f33cd0
1 измененных файлов с 1 добавлено и 4 удалено
  1. 1 4
      scene/gui/rich_text_label.cpp

+ 1 - 4
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);