浏览代码

fixed paste wrt history/undo

Nicolas Cannasse 4 年之前
父节点
当前提交
7aef72a162
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      hide/comp/SceneEditor.hx

+ 2 - 2
hide/comp/SceneEditor.hx

@@ -1767,7 +1767,7 @@ class SceneEditor {
 		if(obj != null) {
 			var p = hrt.prefab.Prefab.loadPrefab(obj, parent);
 			autoName(p);
-			refresh();
+			addObject([p]);
 		}
 		else {
 			obj = view.getClipboard("library");
@@ -1777,7 +1777,7 @@ class SceneEditor {
 					autoName(c);
 					c.parent = parent;
 				}
-				refresh();
+				addObject(lib.children);
 			}
 		}
 	}