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:
Rémi Verschelde 2019-05-28 19:26:33 +02:00 committed by GitHub
commit 3a1c096eb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)