summaryrefslogtreecommitdiffstats
path: root/editor/code_editor.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-11-23 00:14:08 +0100
committerkobewi <kobewi4e@gmail.com>2024-02-19 21:34:45 +0100
commita031911c828da4f6f93950afa0688ac062bc96bd (patch)
tree67c9e6adbc28186ae60bff4afcb2ba2ece47bd59 /editor/code_editor.cpp
parent0246230e2b7c542f003c3c53cffc22dedc0c9c50 (diff)
downloadredot-engine-a031911c828da4f6f93950afa0688ac062bc96bd.tar.gz
Use check_changed_settings_in_group() everywhere
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r--editor/code_editor.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 76d0d40110..e7d2f2bda7 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -38,6 +38,7 @@
#include "editor/editor_string_names.h"
#include "editor/plugins/script_editor_plugin.h"
#include "editor/themes/editor_scale.h"
+#include "editor/themes/editor_theme_manager.h"
#include "scene/resources/font.h"
void GotoLineDialog::popup_find_line(CodeEdit *p_edit) {
@@ -92,8 +93,13 @@ GotoLineDialog::GotoLineDialog() {
void FindReplaceBar::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_READY:
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+ if (!EditorThemeManager::is_generated_theme_outdated()) {
+ break;
+ }
+ [[fallthrough]];
+ }
+ case NOTIFICATION_READY: {
find_prev->set_icon(get_editor_theme_icon(SNAME("MoveUp")));
find_next->set_icon(get_editor_theme_icon(SNAME("MoveDown")));
hide_button->set_texture_normal(get_editor_theme_icon(SNAME("Close")));
@@ -1721,7 +1727,11 @@ void CodeTextEditor::_update_text_editor_theme() {
}
void CodeTextEditor::_on_settings_change() {
- _apply_settings_change();
+ if (EditorThemeManager::is_generated_theme_outdated() ||
+ EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor") ||
+ EditorSettings::get_singleton()->check_changed_settings_in_group("text_editor/completion")) {
+ _apply_settings_change();
+ }
}
void CodeTextEditor::_apply_settings_change() {