diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-04-18 16:35:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-18 16:35:38 +0200 |
commit | 3b1ea51e4079bd7772cbfad731ef57f49006f461 (patch) | |
tree | 3fa3ab8b4baee436adb5264686c44aafff641cc6 /scene/2d/canvas_item.cpp | |
parent | db705386883eb656e9b51ff3437573f76c8aa6f3 (diff) | |
parent | d42b17607ef14aeb72036f8747eb4d5c64979872 (diff) | |
download | redot-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.cpp | 3 |
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 |