summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-05-31 15:50:02 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-05-31 15:50:02 +0200
commit44b0146953e3cf1b7af3449912ef1747161abc01 (patch)
treebdf81e3e20c3f535a060f0887ac53f15c952bd34
parent819911d16e9d5c556cb37de05cedc28d326d9b29 (diff)
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 :)
-rw-r--r--scene/2d/canvas_item.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index f1c09594da..27bdeda4a8 100644
--- a/scene/2d/canvas_item.cpp
+++ b/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