Explorar el Código

If nothing selected, use scene as parent for create menu

Josh Engebretson hace 10 años
padre
commit
62f1f3d626
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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;