From bcbbbeb050885be39f3d95c9c5b9895e581d326c Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Wed, 19 Jan 2022 18:02:22 +0300 Subject: [PATCH] Ignore layout and translation changes in Controls outside of tree --- scene/gui/control.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 11d79468660..f167062f7d7 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -733,8 +733,10 @@ void Control::_notification(int p_notification) { } break; case NOTIFICATION_TRANSLATION_CHANGED: case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: { - data.is_rtl_dirty = true; - _size_changed(); + if (is_inside_tree()) { + data.is_rtl_dirty = true; + _size_changed(); + } } break; } }