瀏覽代碼

Attempt to fix rich text label effects processing even when
the node is invisible.

ISSUE:47687
(cherry picked from commit c4f976b38bb374add8c14d650b23b5bf43669605)

Eoin O'Neill 4 年之前
父節點
當前提交
0e7c2ea331
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      scene/gui/rich_text_label.cpp

+ 5 - 4
scene/gui/rich_text_label.cpp

@@ -1022,10 +1022,11 @@ void RichTextLabel::_notification(int p_what) {
 			}
 		} break;
 		case NOTIFICATION_INTERNAL_PROCESS: {
-			float dt = get_process_delta_time();
-
-			_update_fx(main, dt);
-			update();
+			if (is_visible_in_tree()) {
+				float dt = get_process_delta_time();
+				_update_fx(main, dt);
+				update();
+			}
 		}
 	}
 }