Sfoglia il codice sorgente

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

ISSUE:47687

Eoin O'Neill 4 anni fa
parent
commit
c4f976b38b
1 ha cambiato i file con 5 aggiunte e 4 eliminazioni
  1. 5 4
      scene/gui/rich_text_label.cpp

+ 5 - 4
scene/gui/rich_text_label.cpp

@@ -1432,10 +1432,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();
+			}
 		}
 	}
 }