summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-07-08 15:38:30 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-07-26 08:38:05 +0300
commit36ef8f29dcea579aab058e1778303e10360c7e83 (patch)
treea8206b91fb0d26e5ec550bcbdaaaf151eb3b80ab /scene/gui
parent3e0e84a54c1c5666c32dbc2abd419b61e071ba33 (diff)
Implement support for loading system fonts on Linux, macOS / iOS and Windows.
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/text_edit.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 06553cd0f6..630a3316d6 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -443,8 +443,10 @@ void TextEdit::_notification(int p_what) {
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
case NOTIFICATION_TRANSLATION_CHANGED:
case NOTIFICATION_THEME_CHANGED: {
- _update_caches();
- _update_wrap_at_column(true);
+ if (is_inside_tree()) {
+ _update_caches();
+ _update_wrap_at_column(true);
+ }
} break;
case NOTIFICATION_WM_WINDOW_FOCUS_IN: {