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

Method spawnMenu

gui/builtinAdditionPanes/commandView.py:192–209  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

190 event.Skip()
191
192 def spawnMenu(self, event):
193 clickedPos = self.getRowByAbs(event.Position)
194 self.ensureSelection(clickedPos)
195
196 selection = self.getSelectedCommandFits()
197 mainCommandFit = None
198 if clickedPos != -1:
199 try:
200 mainCommandFit = self.fits[clickedPos]
201 except IndexError:
202 pass
203 contexts = []
204 if mainCommandFit is not None:
205 contexts.append(('commandFit', _t('Command Fit')))
206 contexts.append(('commandView',))
207 menu = ContextMenu.getMenu(self, mainCommandFit, selection, *contexts)
208 if menu:
209 self.PopupMenu(menu)
210
211 def onLeftDoubleClick(self, event):
212 row, _ = self.HitTest(event.Position)

Callers

nothing calls this directly

Calls 6

getRowByAbsMethod · 0.80
ensureSelectionMethod · 0.80
getMenuMethod · 0.80
_tFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected