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
|
|||
}
|
||||
}
|
||||
|
||||
node->set_name(get_name());
|
||||
if (get_name() != String()) {
|
||||
node->set_name(get_name());
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if ((p_flags & DUPLICATE_FROM_EDITOR) && r_duplimap)
|
||||
|
|
Loading…
Reference in New Issue