浏览代码

Merge pull request #43630 from mbrlabs/nodepath-fix-2

Fixed deletion of nodes with exported node paths
Rémi Verschelde 4 年之前
父节点
当前提交
bfed10185a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      editor/scene_tree_dock.cpp

+ 2 - 2
editor/scene_tree_dock.cpp

@@ -1348,8 +1348,8 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
 							break;
 						}
 
-						// update if the node itself moved up/down the tree hirarchy
-						if (root_path == F->get().first) {
+						// update the node itself if it has a valid node path and has not been deleted
+						if (root_path == F->get().first && p != NodePath() && F->get().second != NodePath()) {
 							NodePath abs_path = NodePath(String(root_path).plus_file(p)).simplified();
 							NodePath rel_path_new = F->get().second.rel_path_to(abs_path);