diff options
author | Yuri Sizov <yuris@humnom.net> | 2022-01-19 18:02:22 +0300 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2022-01-19 18:02:22 +0300 |
commit | bcbbbeb050885be39f3d95c9c5b9895e581d326c (patch) | |
tree | 1407dc3a3fa7272185a37d6cee412ad604a2a64a /scene/gui/control.cpp | |
parent | 82efb1d262aea24b5f742820017fd11c496c3f8c (diff) |
Ignore layout and translation changes in Controls outside of tree
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r-- | scene/gui/control.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 11d7946866..f167062f7d 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; } } |