From 76174cb05a3c2031bc0295e34170631739418e49 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 29 Mar 2022 10:44:09 +0300 Subject: [PATCH] Update sub-viewport canvas items to ensure oversampling is applied correctly. --- scene/main/viewport.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index d59764b8ed4..20cb0176e01 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1038,8 +1038,8 @@ Transform2D Viewport::get_final_transform() const { void Viewport::_update_canvas_items(Node *p_node) { if (p_node != this) { - Viewport *vp = Object::cast_to(p_node); - if (vp) { + Window *w = Object::cast_to(p_node); + if (w && (!w->is_inside_tree() || !w->is_embedded())) { return; }