Ver código fonte

Merge pull request #48711 from Eoin-ONeill-Yokai/bug47687

Fix rich text label effects processing even when the node is invisible.
Rémi Verschelde 4 anos atrás
pai
commit
420e75f277
1 arquivos alterados com 5 adições e 4 exclusões
  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();
+			}
 		}
 	}
 }