Browse Source

Merge pull request #71152 from nongvantinh/fix-70981

Fix node name in the SceneTreeEditor allows a node to have no name
Rémi Verschelde 2 years ago
parent
commit
7dfcd55567
1 changed files with 4 additions and 0 deletions
  1. 4 0
      editor/scene_tree_editor.cpp

+ 4 - 0
editor/scene_tree_editor.cpp

@@ -993,6 +993,10 @@ void SceneTreeEditor::_renamed() {
 	}
 
 	if (new_name == n->get_name()) {
+		if (which->get_text(0).is_empty()) {
+			which->set_text(0, new_name);
+		}
+
 		return;
 	}