summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-08-26 10:37:44 +0200
committerGitHub <noreply@github.com>2022-08-26 10:37:44 +0200
commit7bb92bc04059c32c38098b0ccf662f5a610e0380 (patch)
tree3ede59dea8948106c300a8becdea963474742ce4 /editor
parent9f48db16c26319f87defa4221c4318494bc6dda0 (diff)
parent74eb2a70bd7ab881776b30fb34bf98d03651bf52 (diff)
downloadredot-engine-7bb92bc04059c32c38098b0ccf662f5a610e0380.tar.gz
Merge pull request #62845 from AaronRecord/dont_update_theme_outside_of_tree
Refactor and remove excessive calls of `NOTIFICATION_THEME_CHANGED`
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_log.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index dc03a1f270..f540e2b2a1 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -252,6 +252,11 @@ void EditorLog::_rebuild_log() {
}
void EditorLog::_add_log_line(LogMessage &p_message, bool p_replace_previous) {
+ if (!is_inside_tree()) {
+ // The log will be built all at once when it enters the tree and has its theme items.
+ return;
+ }
+
// Only add the message to the log if it passes the filters.
bool filter_active = type_filter_map[p_message.type]->is_active();
String search_text = search_box->get_text();