Browse Source

Add and remove nodes on prefab operation

Josh Engebretson 10 years ago
parent
commit
cd33ddbffb
1 changed files with 8 additions and 1 deletions
  1. 8 1
      Script/AtomicEditor/ui/frames/inspector/SelectionInspector.ts

+ 8 - 1
Script/AtomicEditor/ui/frames/inspector/SelectionInspector.ts

@@ -403,6 +403,10 @@ class SelectionInspector extends ScriptWidget {
 
         c.savePrefab();
 
+        var node = this.nodes[0];
+        this.removeNode(node);
+        this.addNode(node);
+        
     }
 
     handleSelectionPrefabBreak() {
@@ -415,7 +419,10 @@ class SelectionInspector extends ScriptWidget {
             return;
 
         c.breakPrefab();
-        this.refresh();
+
+        var node = this.nodes[0];
+        this.removeNode(node);
+        this.addNode(node);
 
     }