diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2019-04-20 12:51:25 +0100 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2019-04-20 13:13:54 +0100 |
commit | a6562cd0048f1dadb3c1ab2f8583e21251634365 (patch) | |
tree | 2524b01c35f14a70b9c33e963f1d15b9169ebc7f /editor/plugins/script_editor_plugin.cpp | |
parent | 725e8b771bba93d3f82bd8b9e596d61b1daf14f6 (diff) |
Display connection information in the script editor
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index d7d4cec07d..747cf5409a 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1801,6 +1801,16 @@ void ScriptEditor::_update_script_names() { _update_script_colors(); } +void ScriptEditor::_update_script_connections() { + for (int i = 0; i < tab_container->get_child_count(); i++) { + ScriptTextEditor *ste = Object::cast_to<ScriptTextEditor>(tab_container->get_child(i)); + if (!ste) { + continue; + } + ste->_update_connected_methods(); + } +} + Ref<TextFile> ScriptEditor::_load_text_file(const String &p_path, Error *r_error) { if (r_error) { *r_error = ERR_FILE_CANT_OPEN; @@ -2203,6 +2213,7 @@ void ScriptEditor::_tree_changed() { waiting_update_names = true; call_deferred("_update_script_names"); + call_deferred("_update_script_connections"); } void ScriptEditor::_script_split_dragged(float) { @@ -2856,6 +2867,7 @@ void ScriptEditor::_bind_methods() { ClassDB::bind_method("_autosave_scripts", &ScriptEditor::_autosave_scripts); ClassDB::bind_method("_editor_settings_changed", &ScriptEditor::_editor_settings_changed); ClassDB::bind_method("_update_script_names", &ScriptEditor::_update_script_names); + ClassDB::bind_method("_update_script_connections", &ScriptEditor::_update_script_connections); ClassDB::bind_method("_tree_changed", &ScriptEditor::_tree_changed); ClassDB::bind_method("_members_overview_selected", &ScriptEditor::_members_overview_selected); ClassDB::bind_method("_help_overview_selected", &ScriptEditor::_help_overview_selected); |