summaryrefslogtreecommitdiff
path: root/editor/plugins/script_editor_plugin.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-22 11:52:13 +0200
committerGitHub <noreply@github.com>2019-04-22 11:52:13 +0200
commit22457b907efcbf7121c8451799de6d800c4fd430 (patch)
tree6bd572de090d62b78f5e687cf1a6f0458ef03b2f /editor/plugins/script_editor_plugin.cpp
parent828dc8e19c784ac27d8ed6de98c52cd55a823990 (diff)
parenta6562cd0048f1dadb3c1ab2f8583e21251634365 (diff)
Merge pull request #28234 from Paulb23/connection_info_on_script
Display connection information in the script editor
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r--editor/plugins/script_editor_plugin.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 8fdeb1cd39..5d81ade214 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) {
@@ -2871,6 +2882,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);