You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
Fixed error when duplicating a scene which has connection
Fixed error when duplicating a scene which has connection
This commit is contained in:
@@ -2192,7 +2192,7 @@ void Node::_duplicate_signals(const Node *p_original, Node *p_copy) const {
|
|||||||
if (p_copy->has_node(ptarget))
|
if (p_copy->has_node(ptarget))
|
||||||
copytarget = p_copy->get_node(ptarget);
|
copytarget = p_copy->get_node(ptarget);
|
||||||
|
|
||||||
if (copy && copytarget) {
|
if (copy && copytarget && !copy->is_connected(E->get().signal, copytarget, E->get().method)) {
|
||||||
copy->connect(E->get().signal, copytarget, E->get().method, E->get().binds, E->get().flags);
|
copy->connect(E->get().signal, copytarget, E->get().method, E->get().binds, E->get().flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user