Update root order on layer change

When the layer of a CanvasLayer changes, the order of roots needs to be recalculated.

(cherry picked from commit 8d60e8b5d4120d9f9a4868bfb8f0059e733d6d5f)
This commit is contained in:
Markus Sauermann 2022-03-24 19:14:14 +01:00 committed by Relintai
parent 6eb0adced6
commit fc7038b073

View File

@ -37,6 +37,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_position_in_parent());
vp->_gui_set_root_order_dirty();
}
}