mirror of
https://github.com/godotengine/godot.git
synced 2025-01-24 03:24:32 -05:00
Merge pull request #23734 from RandomShaper/fix-canvas-layer-out-of-tree
Fix CanvasLayer trying to re-stack while out of tree
This commit is contained in:
commit
193324f354
1 changed files with 3 additions and 1 deletions
|
@ -164,7 +164,9 @@ void CanvasLayer::_notification(int p_what) {
|
|||
} break;
|
||||
case NOTIFICATION_MOVED_IN_PARENT: {
|
||||
|
||||
VisualServer::get_singleton()->viewport_set_canvas_stacking(viewport, canvas, layer, get_position_in_parent());
|
||||
if (is_inside_tree())
|
||||
VisualServer::get_singleton()->viewport_set_canvas_stacking(viewport, canvas, layer, get_position_in_parent());
|
||||
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue