Преглед изворни кода

Revert "Revert "Prevent visibility notification been called twice in object creation""

This reverts commit 4d277b96ad581358f63870ae051dc73b69c82cd7.

Woops, this wasn't meant to be committed. I just reverted it locally
to test something, nothing wrong with the original commit :)
Rémi Verschelde пре 7 година
родитељ
комит
44b0146953
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      scene/2d/canvas_item.cpp

+ 2 - 1
scene/2d/canvas_item.cpp

@@ -272,7 +272,8 @@ bool CanvasItem::is_visible_in_tree() const {
 
 void CanvasItem::_propagate_visibility_changed(bool p_visible) {
 
-	notification(NOTIFICATION_VISIBILITY_CHANGED);
+	if (!first_draw)
+		notification(NOTIFICATION_VISIBILITY_CHANGED);
 
 	if (p_visible)
 		update(); //todo optimize