diff options
author | Chaosus <chaosus89@gmail.com> | 2018-04-13 15:11:19 +0300 |
---|---|---|
committer | Chaosus <chaosus89@gmail.com> | 2018-04-13 15:28:38 +0300 |
commit | d42b17607ef14aeb72036f8747eb4d5c64979872 (patch) | |
tree | 58568bb939c66cd2cd827f25c12480374d0d3eba | |
parent | 3a5b25d5b489ad88c2861c9c37b56469580fbf03 (diff) |
Prevent visibility notification been called twice in object creation
-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 2b89062181..8a6a86d9d1 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -263,7 +263,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 |