diff options
author | Yuri Sizov <yuris@humnom.net> | 2024-01-24 14:08:20 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2024-01-24 14:08:20 +0100 |
commit | adcfe3d1a0fcb6313c656cbad09fec0ff48ad4a7 (patch) | |
tree | 17242502a5ec87f91c376aa56819234b1055eb44 /scene | |
parent | ea6e20253b1eb4e059a24fb588e55beb48d2e5cb (diff) | |
parent | 2f697926b0aac7fd59fd5bd0e496f0327dd98428 (diff) | |
download | redot-engine-adcfe3d1a0fcb6313c656cbad09fec0ff48ad4a7.tar.gz |
Merge pull request #87252 from ajreckof/Fix-renaming-a-node-to-the-name-of-its-siblings-breaking-NodePath
Fix renaming a node to the name of its siblings breaking NodePath
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/node.cpp | 5 | ||||
-rw-r--r-- | scene/main/node.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index f7d695bf31..704ff3e978 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1214,6 +1214,11 @@ String Node::validate_child_name(Node *p_child) { _generate_serial_child_name(p_child, name); return name; } + +String Node::prevalidate_child_name(Node *p_child, StringName p_name) { + _generate_serial_child_name(p_child, p_name); + return p_name; +} #endif String Node::adjust_name_casing(const String &p_name) { diff --git a/scene/main/node.h b/scene/main/node.h index 8130c61a34..c82300e6a0 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -614,6 +614,7 @@ public: #ifdef TOOLS_ENABLED String validate_child_name(Node *p_child); + String prevalidate_child_name(Node *p_child, StringName p_name); #endif static String adjust_name_casing(const String &p_name); |