Fix code completion popup colors not being updated properly
(cherry picked from commit 4eafa3c58712a14046bb8f164051c08170c354a6)
This commit is contained in:
committed by
Thaddeus Crews
parent
e3e7ec09b4
commit
9865127b11
@@ -1843,6 +1843,15 @@ void ScriptEditor::_notification(int p_what) {
|
||||
}
|
||||
} break;
|
||||
|
||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||
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")) {
|
||||
_apply_editor_settings();
|
||||
}
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_READY: {
|
||||
// Can't set own styles in NOTIFICATION_THEME_CHANGED, so for now this will do.
|
||||
add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("ScriptEditorPanel"), EditorStringName(EditorStyles)));
|
||||
@@ -1863,7 +1872,6 @@ void ScriptEditor::_notification(int p_what) {
|
||||
script_split->connect("dragged", callable_mp(this, &ScriptEditor::_split_dragged));
|
||||
list_split->connect("dragged", callable_mp(this, &ScriptEditor::_split_dragged));
|
||||
|
||||
EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &ScriptEditor::_editor_settings_changed));
|
||||
EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &ScriptEditor::_filesystem_changed));
|
||||
#ifdef ANDROID_ENABLED
|
||||
set_process(true);
|
||||
@@ -3051,17 +3059,6 @@ void ScriptEditor::_save_layout() {
|
||||
EditorNode::get_singleton()->save_editor_layout_delayed();
|
||||
}
|
||||
|
||||
void ScriptEditor::_editor_settings_changed() {
|
||||
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;
|
||||
}
|
||||
|
||||
_apply_editor_settings();
|
||||
}
|
||||
|
||||
void ScriptEditor::_apply_editor_settings() {
|
||||
textfile_extensions.clear();
|
||||
const Vector<String> textfile_ext = ((String)(EDITOR_GET("docks/filesystem/textfile_extensions"))).split(",", false);
|
||||
|
||||
@@ -475,7 +475,6 @@ class ScriptEditor : public PanelContainer {
|
||||
Ref<ConfigFile> script_editor_cache;
|
||||
void _save_editor_state(ScriptEditorBase *p_editor);
|
||||
void _save_layout();
|
||||
void _editor_settings_changed();
|
||||
void _apply_editor_settings();
|
||||
void _filesystem_changed();
|
||||
void _files_moved(const String &p_old_file, const String &p_new_file);
|
||||
|
||||
@@ -792,6 +792,14 @@ void TextShaderEditor::_prepare_edit_menu() {
|
||||
|
||||
void TextShaderEditor::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||
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")) {
|
||||
_apply_editor_settings();
|
||||
}
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
site_search->set_button_icon(get_editor_theme_icon(SNAME("ExternalLink")));
|
||||
} break;
|
||||
@@ -802,16 +810,6 @@ void TextShaderEditor::_notification(int p_what) {
|
||||
}
|
||||
}
|
||||
|
||||
void TextShaderEditor::_editor_settings_changed() {
|
||||
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;
|
||||
}
|
||||
|
||||
_apply_editor_settings();
|
||||
}
|
||||
|
||||
void TextShaderEditor::_apply_editor_settings() {
|
||||
code_editor->update_editor_settings();
|
||||
|
||||
@@ -1188,7 +1186,6 @@ TextShaderEditor::TextShaderEditor() {
|
||||
|
||||
code_editor->connect("show_warnings_panel", callable_mp(this, &TextShaderEditor::_show_warnings_panel));
|
||||
code_editor->connect(CoreStringName(script_changed), callable_mp(this, &TextShaderEditor::apply_shaders));
|
||||
EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &TextShaderEditor::_editor_settings_changed));
|
||||
ProjectSettings::get_singleton()->connect("settings_changed", callable_mp(this, &TextShaderEditor::_project_settings_changed));
|
||||
|
||||
code_editor->get_text_editor()->set_symbol_lookup_on_click_enabled(true);
|
||||
@@ -1327,6 +1324,6 @@ TextShaderEditor::TextShaderEditor() {
|
||||
|
||||
add_child(disk_changed);
|
||||
|
||||
_editor_settings_changed();
|
||||
_apply_editor_settings();
|
||||
code_editor->show_toggle_files_button(); // TODO: Disabled for now, because it doesn't work properly.
|
||||
}
|
||||
|
||||
@@ -155,7 +155,6 @@ class TextShaderEditor : public ShaderEditor {
|
||||
mutable Ref<Shader> shader;
|
||||
mutable Ref<ShaderInclude> shader_inc;
|
||||
|
||||
void _editor_settings_changed();
|
||||
void _apply_editor_settings();
|
||||
void _project_settings_changed();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user