Merge pull request #29246 from akien-mga/whats-in-a-name
Node::duplicate: Don't set name if original node is nameless
This commit is contained in:
commit
3a1c096eb8
@ -2077,7 +2077,9 @@ Node *Node::_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (get_name() != String()) {
|
||||||
node->set_name(get_name());
|
node->set_name(get_name());
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
if ((p_flags & DUPLICATE_FROM_EDITOR) && r_duplimap)
|
if ((p_flags & DUPLICATE_FROM_EDITOR) && r_duplimap)
|
||||||
|
Loading…
Reference in New Issue
Block a user