Merge pull request #66815 from Rindbee/fix-blinking-line-gutter-icon

Fix the flickering of the line gutter icon when saving
This commit is contained in:
Rémi Verschelde 2022-10-03 14:52:21 +02:00
commit 5b735d000e
4 changed files with 2 additions and 13 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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) {

View File

@ -150,6 +150,7 @@ void TextEditor::reload_text() {
te->tag_saved_version();
code_editor->update_line_and_column();
_validate_script();
}
void TextEditor::_validate_script() {