CONNECT_APPEND_SOURCE_OBJECT on signal emission

This commit is contained in:
kleonc
2025-12-26 12:21:01 +01:00
parent f4499eea4b
commit edd06075e3
6 changed files with 111 additions and 17 deletions

View File

@@ -664,9 +664,6 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
Callable callable(cto, snames[c.method]);
Array binds;
if (c.flags & CONNECT_APPEND_SOURCE_OBJECT) {
binds.push_back(cfrom);
}
for (int bind : c.binds) {
binds.push_back(props[bind]);
@@ -1193,11 +1190,6 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, HashMap<String
unbinds = ccu->get_unbinds();
base_callable = ccu->get_callable();
}
// The source object may already be bound, ignore it to avoid saving the source object.
if ((c.flags & CONNECT_APPEND_SOURCE_OBJECT) && (p_node == binds[0])) {
binds.remove_at(0);
}
} else {
base_callable = c.callable;
}