Browse Source

Redo serial name fixup from 799ed2b98984414fd3b7b667c5e3e5d2e6d35a66

reduz wanted the original PR reverted due to issues, so this follow-up had to be too
(done in 8cb54182ad2698a962def84f79cc8206ac9f13b2). But he ended up adapting part of
the original PR in 27d77723811c2652c6118eca03a38c4ae1441895 without including this fix.
Rémi Verschelde 6 years ago
parent
commit
1ff170e67f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/main/node.cpp

+ 1 - 1
scene/main/node.cpp

@@ -1098,7 +1098,7 @@ void Node::_generate_serial_child_name(const Node *p_child, StringName &name) co
 
 
 	// Assign the base name + separator to name if we have numbers preceded by a separator
 	// Assign the base name + separator to name if we have numbers preceded by a separator
 	if (nums.length() > 0 && name_string.substr(name_last_index, nnsep.length()) == nnsep) {
 	if (nums.length() > 0 && name_string.substr(name_last_index, nnsep.length()) == nnsep) {
-		name_string = name_string.substr(0, name_last_index + nnsep.length()).strip_edges();
+		name_string = name_string.substr(0, name_last_index + nnsep.length());
 	} else {
 	} else {
 		nums = "";
 		nums = "";
 	}
 	}