Przeglądaj źródła

If nothing selected, use scene as parent for create menu

Josh Engebretson 10 lat temu
rodzic
commit
62f1f3d626
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      Script/AtomicEditor/ui/frames/HierarchyFrame.ts

+ 2 - 0
Script/AtomicEditor/ui/frames/HierarchyFrame.ts

@@ -348,6 +348,8 @@ class HierarchyFrame extends Atomic.UIWidget {
 
                 var selectedId = Number(this.hierList.rootList.selectedItemID);
                 var node = this.scene.getNode(selectedId);
+                if (!node)
+                    node = this.scene;
                 if (this.menu.handlePopupMenu(data.target, data.refid, node))
                     return true;