From 8d60e8b5d4120d9f9a4868bfb8f0059e733d6d5f Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Thu, 24 Mar 2022 19:14:14 +0100 Subject: Update root order on layer change When the layer of a CanvasLayer changes, the order of roots needs to be recalculated. --- scene/main/canvas_layer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp index 7aa4d391f8..1ca8364127 100644 --- a/scene/main/canvas_layer.cpp +++ b/scene/main/canvas_layer.cpp @@ -38,6 +38,7 @@ void CanvasLayer::set_layer(int p_xform) { layer = p_xform; if (viewport.is_valid()) { RenderingServer::get_singleton()->viewport_set_canvas_stacking(viewport, canvas, layer, get_index()); + vp->_gui_set_root_order_dirty(); } } -- cgit v1.2.3