summaryrefslogtreecommitdiffstats
path: root/scene/2d/canvas_item.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-04-18 16:35:38 +0200
committerGitHub <noreply@github.com>2018-04-18 16:35:38 +0200
commit3b1ea51e4079bd7772cbfad731ef57f49006f461 (patch)
tree3fa3ab8b4baee436adb5264686c44aafff641cc6 /scene/2d/canvas_item.cpp
parentdb705386883eb656e9b51ff3437573f76c8aa6f3 (diff)
parentd42b17607ef14aeb72036f8747eb4d5c64979872 (diff)
downloadredot-engine-3b1ea51e4079bd7772cbfad731ef57f49006f461.tar.gz
Merge pull request #18172 from Chaosus/fix_notification
Prevent visibility notification from being called twice in object creation
Diffstat (limited to 'scene/2d/canvas_item.cpp')
-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 60368816a9..a2637f816e 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -271,7 +271,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