Skip to content

Commit

Permalink
Avoid duplicate visility changed notification, fixes #18160
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed Nov 16, 2018
1 parent 6ed1be9 commit 0afdc5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scene/2d/canvas_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@ bool CanvasItem::is_visible_in_tree() const {

void CanvasItem::_propagate_visibility_changed(bool p_visible) {

if (p_visible && first_draw) { //avoid propagating it twice
first_draw = false;
}
notification(NOTIFICATION_VISIBILITY_CHANGED);

if (p_visible)
Expand Down

0 comments on commit 0afdc5c

Please sign in to comment.