MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / spawnMenu

Method spawnMenu

gui/builtinAdditionPanes/droneView.py:320–337  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

318 event.Skip()
319
320 def spawnMenu(self, event):
321 clickedPos = self.getRowByAbs(event.Position)
322 self.ensureSelection(clickedPos)
323
324 mainDrone = None
325 if clickedPos != -1:
326 try:
327 drone = self.drones[clickedPos]
328 except IndexError:
329 pass
330 else:
331 if drone in self.original:
332 mainDrone = drone
333 selection = self.getSelectedDrones()
334 itemContext = None if mainDrone is None else Market.getInstance().getCategoryByItem(mainDrone.item).displayName
335 menu = ContextMenu.getMenu(self, mainDrone, selection, ("droneItem", itemContext), ("droneItemMisc", itemContext))
336 if menu:
337 self.PopupMenu(menu)
338
339 def getSelectedDrones(self):
340 drones = []

Callers

nothing calls this directly

Calls 6

getSelectedDronesMethod · 0.95
getRowByAbsMethod · 0.80
ensureSelectionMethod · 0.80
getCategoryByItemMethod · 0.80
getMenuMethod · 0.80
getInstanceMethod · 0.45

Tested by

no test coverage detected