From 97085358ce154f34d6ab571c35529a8b0e063513 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:13:46 +0300 Subject: [PATCH] [Editor] Prevent unnecessary editor theme regeneration on unrelated system setting update. --- editor/editor_node.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index d1dffba2ab5..47c23ed9d6b 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -670,7 +670,10 @@ void EditorNode::_notification(int p_what) { callable_mp(this, &EditorNode::_begin_first_scan).call_deferred(); - DisplayServer::get_singleton()->set_system_theme_change_callback(callable_mp(this, &EditorNode::_update_theme).bind(false)); + last_dark_mode_state = DisplayServer::get_singleton()->is_dark_mode(); + last_system_accent_color = DisplayServer::get_singleton()->get_accent_color(); + last_system_base_color = DisplayServer::get_singleton()->get_base_color(); + DisplayServer::get_singleton()->set_system_theme_change_callback(callable_mp(this, &EditorNode::_check_system_theme_changed)); /* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */ } break;