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

Method click

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

Source from the content-addressed store, hash-verified

168 self.update(stuff)
169
170 def click(self, event):
171 mainRow, _ = self.HitTest(event.Position)
172 if mainRow != -1:
173 col = self.getColumn(event.Position)
174 if col == self.getColIndex(State):
175 fitID = self.mainFrame.getActiveFit()
176 try:
177 mainCommandFitID = self.fits[mainRow].ID
178 except IndexError:
179 return
180 commandFitIDs = []
181 for commandFit in self.getSelectedCommandFits():
182 commandFitIDs.append(commandFit.ID)
183 if mainCommandFitID not in commandFitIDs:
184 commandFitIDs = [mainCommandFitID]
185 self.mainFrame.command.Submit(cmd.GuiToggleCommandFitStatesCommand(
186 fitID=fitID,
187 mainCommandFitID=mainCommandFitID,
188 commandFitIDs=commandFitIDs))
189 return
190 event.Skip()
191
192 def spawnMenu(self, event):
193 clickedPos = self.getRowByAbs(event.Position)

Callers

nothing calls this directly

Calls 6

getColIndexMethod · 0.80
HitTestMethod · 0.45
getColumnMethod · 0.45
getActiveFitMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected