浏览代码

meshspray: fix brush

lviguier 1 年之前
父节点
当前提交
e0d5918aba
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      hide/comp/SceneEditor.hx

+ 8 - 1
hide/comp/SceneEditor.hx

@@ -2688,7 +2688,14 @@ class SceneEditor {
 	}
 
 	function hasBeenRemoved( e : hrt.prefab.Prefab ) {
-		var root = sceneData;
+		var root = e;
+
+		if (root.shared != null && root.shared.parentPrefab != null) {
+			if (hasBeenRemoved(root.shared.parentPrefab))
+				return true;
+			root = null;
+		}
+
 		while( e != null && e != root ) {
 			if( e.parent != null && e.parent.children.indexOf(e) < 0 )
 				return true;