Merge pull request #62845 from AaronRecord/dont_update_theme_outside_of_tree

Refactor and remove excessive calls of `NOTIFICATION_THEME_CHANGED`
This commit is contained in:
Rémi Verschelde 2022-08-26 10:37:44 +02:00 committed by GitHub
commit 7bb92bc040
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 170 additions and 182 deletions

View file

@ -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();