summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-29 12:46:24 +0200
committerGitHub <noreply@github.com>2022-03-29 12:46:24 +0200
commit11a5f612fa208a680e3c421a1c360406ec520bb2 (patch)
treed0f6e0e91e88379d9808802f983eee30c2b7bef2 /scene/main
parent3b4e94c8b57908f61a9028f757b2f4f8edc8987b (diff)
parent76174cb05a3c2031bc0295e34170631739418e49 (diff)
Merge pull request #59663 from bruvzg/subviewport_update
Diffstat (limited to 'scene/main')
-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;
}