mirror of
https://github.com/godotengine/godot.git
synced 2025-01-30 21:33:18 +08:00
Fix connection info still appearing on scripts if the node source is deleted
This commit is contained in:
parent
629bc10d80
commit
b3010d9734
@ -867,6 +867,12 @@ void ScriptTextEditor::_update_connected_methods() {
|
||||
continue;
|
||||
}
|
||||
|
||||
// As deleted nodes are still accessible via the undo/redo system, check if they're still on the tree.
|
||||
Node *source = Object::cast_to<Node>(connection.source);
|
||||
if (source && !source->is_inside_tree()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int line = script->get_language()->find_function(connection.method, text_edit->get_text());
|
||||
if (line < 0) {
|
||||
missing_connections.push_back(connection);
|
||||
|
Loading…
Reference in New Issue
Block a user