diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-03 14:52:21 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-03 14:52:21 +0200 |
commit | 5b735d000e714b3f5bd0f14a2af9b5e6999a30ed (patch) | |
tree | 0ec36cebb023b5c9f844c07b069cd39c976c7039 /editor | |
parent | 44dcd83290b80c46abec950c148fc443e3f8155d (diff) | |
parent | 72a7d874b4e96e9be53891bbe8aaa1982055d868 (diff) |
Merge pull request #66815 from Rindbee/fix-blinking-line-gutter-icon
Fix the flickering of the line gutter icon when saving
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 12 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.h | 1 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/text_editor.cpp | 1 |
4 files changed, 2 insertions, 13 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index c4d48d7cbe..f70f0dc0aa 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2136,16 +2136,6 @@ void ScriptEditor::_update_script_names() { _update_script_colors(); } -void ScriptEditor::_update_script_connections() { - for (int i = 0; i < tab_container->get_tab_count(); i++) { - ScriptTextEditor *ste = Object::cast_to<ScriptTextEditor>(tab_container->get_tab_control(i)); - if (!ste) { - continue; - } - ste->_update_connected_methods(); - } -} - Ref<TextFile> ScriptEditor::_load_text_file(const String &p_path, Error *r_error) const { if (r_error) { *r_error = ERR_FILE_CANT_OPEN; @@ -2819,7 +2809,6 @@ void ScriptEditor::_tree_changed() { waiting_update_names = true; call_deferred(SNAME("_update_script_names")); - call_deferred(SNAME("_update_script_connections")); } void ScriptEditor::_split_dragged(float) { @@ -3616,7 +3605,6 @@ void ScriptEditor::_bind_methods() { ClassDB::bind_method("_goto_script_line2", &ScriptEditor::_goto_script_line2); ClassDB::bind_method("_copy_script_path", &ScriptEditor::_copy_script_path); - ClassDB::bind_method("_update_script_connections", &ScriptEditor::_update_script_connections); ClassDB::bind_method("_help_class_open", &ScriptEditor::_help_class_open); ClassDB::bind_method("_help_tab_goto", &ScriptEditor::_help_tab_goto); ClassDB::bind_method("_live_auto_reload_running_scripts", &ScriptEditor::_live_auto_reload_running_scripts); diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 1e78dc4ec4..233baa9bd3 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -403,7 +403,6 @@ class ScriptEditor : public PanelContainer { void _filter_scripts_text_changed(const String &p_newtext); void _filter_methods_text_changed(const String &p_newtext); void _update_script_names(); - void _update_script_connections(); bool _sort_list_on_update; void _members_overview_selected(int p_idx); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index c21b4356f8..a1d24907e5 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -289,6 +289,7 @@ void ScriptTextEditor::reload_text() { te->tag_saved_version(); code_editor->update_line_and_column(); + _validate_script(); } void ScriptTextEditor::add_callback(const String &p_function, PackedStringArray p_args) { diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index 20809763d0..9846cd4a84 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -150,6 +150,7 @@ void TextEditor::reload_text() { te->tag_saved_version(); code_editor->update_line_and_column(); + _validate_script(); } void TextEditor::_validate_script() { |