diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index eb0ab1174b32..e8142cad7f68 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -1008,6 +1008,8 @@ void ConnectionsDock::_connect(const ConnectDialog::ConnectionData &p_cd) { undo_redo->add_undo_method(SceneTreeDock::get_singleton()->get_tree_editor(), "update_tree"); undo_redo->commit_action(); + + ScriptEditor::get_singleton()->update_connected_methods(); } /* @@ -1028,6 +1030,7 @@ void ConnectionsDock::_disconnect(const ConnectDialog::ConnectionData &p_cd) { undo_redo->add_undo_method(SceneTreeDock::get_singleton()->get_tree_editor(), "update_tree"); undo_redo->commit_action(); + ScriptEditor::get_singleton()->update_connected_methods(); } /* @@ -1061,6 +1064,8 @@ void ConnectionsDock::_disconnect_all() { undo_redo->add_undo_method(SceneTreeDock::get_singleton()->get_tree_editor(), "update_tree"); undo_redo->commit_action(); + + ScriptEditor::get_singleton()->update_connected_methods(); } void ConnectionsDock::_tree_item_selected() { diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index c51eb44aee47..a2a7e3f348e0 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -3766,6 +3766,14 @@ void ScriptEditor::unregister_syntax_highlighter(const Ref(_get_current_editor()); + + if (ste) { + ste->_update_connected_methods(); + } +} + int ScriptEditor::script_editor_func_count = 0; CreateScriptEditorFunc ScriptEditor::script_editor_funcs[ScriptEditor::SCRIPT_EDITOR_FUNC_MAX]; diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 9db1aff76acb..5a18ef674573 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -574,6 +574,8 @@ class ScriptEditor : public PanelContainer { void register_syntax_highlighter(const Ref &p_syntax_highlighter); void unregister_syntax_highlighter(const Ref &p_syntax_highlighter); + void update_connected_methods(); + static void register_create_script_editor_function(CreateScriptEditorFunc p_func); ScriptEditor(WindowWrapper *p_wrapper);