Prevent visibility notification been called twice in object creation

(cherry picked from commit d42b17607e)
This commit is contained in:
Chaosus 2018-04-13 15:11:19 +03:00 committed by Hein-Pieter van Braam
parent 739c14b07d
commit 826108efec

View File

@ -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