Godot Engine – Multi-platform 2D and 3D game engine
Fix node name casing before child name validation
me2662d6563226
diff --git a/editor/docks/scene_tree_dock.cpp b/editor/docks/scene_tree_dock.cppindex e2cc3efb845..b2958c1af05 100644--- a/editor/docks/scene_tree_dock.cpp+++ b/editor/docks/scene_tree_dock.cpp@@ -3168,10 +3168,11 @@ Node *SceneTreeDock::_do_create(Node *p_parent) {Node *child = create_dialog->instantiate_selected<Node>();ERR_FAIL_NULL_V(child, nullptr);- String new_name = p_parent->validate_child_name(child);+ String new_name = child->get_name();if (GLOBAL_GET("editor/naming/node_name_casing").operator int() != NAME_CASING_PASCAL_CASE) {new_name = adjust_name_casing(new_name);}+ new_name = p_parent->prevalidate_child_name(child, new_name);child->set_name(new_name);EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();