summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-03-29 10:44:09 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-03-29 10:44:09 +0300
commit76174cb05a3c2031bc0295e34170631739418e49 (patch)
treeb545177783263516395ff32f69cb223aa1d5923e
parentc5efda5f4ef983c74068ab39f2eb47292cd7b4e9 (diff)
Update sub-viewport canvas items to ensure oversampling is applied correctly.
-rw-r--r--scene/main/viewport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index d59764b8ed..20cb0176e0 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<Viewport>(p_node);
- if (vp) {
+ Window *w = Object::cast_to<Window>(p_node);
+ if (w && (!w->is_inside_tree() || !w->is_embedded())) {
return;
}