diff options
author | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-09-02 01:17:11 -0300 |
---|---|---|
committer | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-09-02 01:17:11 -0300 |
commit | 5f28a2f978af9f906ea5547da3ac7cd41db6c4be (patch) | |
tree | 466a4b6b7617d821fbd7864748738a66514d4068 | |
parent | aa06f515e0730c6bfcff14f9805355ce12db688a (diff) |
Fix multiline texts not updating its contents correctly in the inspector
-rw-r--r-- | scene/gui/text_edit.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index ab5ed3166c..736e546ed8 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -611,7 +611,6 @@ void TextEdit::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - _update_caches(); if (cursor_changed_dirty) MessageQueue::get_singleton()->push_call(this, "_cursor_changed_emit"); @@ -620,12 +619,16 @@ void TextEdit::_notification(int p_what) { _update_wrap_at(); } break; case NOTIFICATION_RESIZED: { - _update_scrollbars(); _update_wrap_at(); } break; + case NOTIFICATION_VISIBILITY_CHANGED: { + if (is_visible()) { + call_deferred("_update_scrollbars"); + call_deferred("_update_wrap_at"); + } + } break; case NOTIFICATION_THEME_CHANGED: { - _update_caches(); _update_wrap_at(); syntax_highlighting_cache.clear(); |