Merge pull request #18172 from Chaosus/fix_notification

Prevent visibility notification from being called twice in object creation
This commit is contained in:
Rémi Verschelde 2018-04-18 16:35:38 +02:00 committed by GitHub
commit 3b1ea51e40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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