diff options
author | kleonc <9283098+kleonc@users.noreply.github.com> | 2023-03-22 20:01:18 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-27 17:47:09 +0200 |
commit | b3f121d108b02a3577c283c02c4d12eb97f331ba (patch) | |
tree | 64315d1e302b5456136b7d57b85927a9e6cd9203 /scene | |
parent | fa9f92112cd6f33e8f4095a45aa0d9f07d540d28 (diff) |
CanvasItem Fix ENTER_CANVAS / VISIBILITY_CHANGED notifications order when entering tree
(cherry picked from commit 6e3820fd4dfb93f9be98fa86f989d123024ed216)
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/canvas_item.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp index b36353158b..72fb838732 100644 --- a/scene/main/canvas_item.cpp +++ b/scene/main/canvas_item.cpp @@ -289,11 +289,12 @@ void CanvasItem::_notification(int p_what) { } } + _enter_canvas(); + RenderingServer::get_singleton()->canvas_item_set_visible(canvas_item, is_visible_in_tree()); // The visibility of the parent may change. if (is_visible_in_tree()) { notification(NOTIFICATION_VISIBILITY_CHANGED); // Considered invisible until entered. } - _enter_canvas(); _update_texture_filter_changed(false); _update_texture_repeat_changed(false); |