Skip to content

Commit

Permalink
Fixed the text editor theme not being applied on editor start.
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorMcDoom committed Feb 25, 2024
1 parent 2e7fc81 commit ea401f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 0 additions & 5 deletions editor/code_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,6 @@ void CodeTextEditor::update_editor_settings() {
text_editor->set_line_length_guidelines(TypedArray<int>());
}

_update_font_ligatures();
set_zoom_factor(zoom_factor);
}

Expand Down Expand Up @@ -1683,10 +1682,6 @@ void CodeTextEditor::goto_error() {
}

void CodeTextEditor::_update_text_editor_theme() {
if (!EditorThemeManager::is_generated_theme_outdated()) {
return;
}

emit_signal(SNAME("load_theme_settings"));

error_button->set_icon(get_editor_theme_icon(SNAME("StatusError")));
Expand Down
4 changes: 3 additions & 1 deletion editor/plugins/script_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#include "editor/plugins/shader_editor_plugin.h"
#include "editor/plugins/text_shader_editor.h"
#include "editor/themes/editor_scale.h"
#include "editor/themes/editor_theme_manager.h"
#include "editor/window_wrapper.h"
#include "scene/main/node.h"
#include "scene/main/window.h"
Expand Down Expand Up @@ -2787,7 +2788,8 @@ void ScriptEditor::_save_layout() {
}

void ScriptEditor::_editor_settings_changed() {
if (!EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor") &&
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") &&
!EditorSettings::get_singleton()->check_changed_settings_in_group("docks/filesystem")) {
return;
Expand Down
4 changes: 3 additions & 1 deletion editor/plugins/text_shader_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "editor/filesystem_dock.h"
#include "editor/project_settings_editor.h"
#include "editor/themes/editor_scale.h"
#include "editor/themes/editor_theme_manager.h"
#include "scene/gui/split_container.h"
#include "servers/rendering/shader_preprocessor.h"
#include "servers/rendering/shader_types.h"
Expand Down Expand Up @@ -740,7 +741,8 @@ void TextShaderEditor::_notification(int p_what) {
}

void TextShaderEditor::_editor_settings_changed() {
if (!EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor") &&
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")) {
return;
}
Expand Down

0 comments on commit ea401f9

Please sign in to comment.