summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkleonc <9283098+kleonc@users.noreply.github.com>2023-03-22 20:01:18 +0100
committerkleonc <9283098+kleonc@users.noreply.github.com>2023-03-22 20:01:22 +0100
commit6e3820fd4dfb93f9be98fa86f989d123024ed216 (patch)
treef2027a48fbacc779a969561113f8bde9ca64011c
parent0291fcd7b66bcb315a49c44de8031e5596de4216 (diff)
downloadredot-engine-6e3820fd4dfb93f9be98fa86f989d123024ed216.tar.gz
CanvasItem Fix ENTER_CANVAS / VISIBILITY_CHANGED notifications order when entering tree
-rw-r--r--scene/main/canvas_item.cpp3
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);