Merge pull request #95849 from bruvzg/sys_theme_check

[Editor] Prevent unnecessary editor theme regeneration on unrelated system setting update.
This commit is contained in:
Rémi Verschelde 2024-08-20 10:03:13 +02:00
commit 8dfb8efaa9
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 4 additions and 1 deletions

View File

@ -671,7 +671,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;