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

Method OnLeftDown

graphs/gui/lists.py:122–141  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

120 self.graphFrame.draw()
121
122 def OnLeftDown(self, event):
123 row, _ = self.HitTest(event.Position)
124 if row != -1:
125 pickers = {
126 self.getColIndex(GraphColor): ColorPickerPopup,
127 self.getColIndex(GraphLightness): LightnessPickerPopup,
128 self.getColIndex(GraphLineStyle): LineStylePickerPopup}
129 # In case we had no index for some column, remove None
130 pickers.pop(None, None)
131 col = self.getColumn(event.Position)
132 if col in pickers:
133 picker = pickers[col]
134 wrapper = self.getWrapper(row)
135 if wrapper is not None:
136 win = picker(parent=self, wrapper=wrapper)
137 pos = wx.GetMousePosition()
138 win.Position(pos, (0, 0))
139 win.Popup()
140 return
141 event.Skip()
142
143 def OnLineStyleChange(self):
144 self.updateView()

Callers

nothing calls this directly

Calls 4

getWrapperMethod · 0.95
getColIndexMethod · 0.80
HitTestMethod · 0.45
getColumnMethod · 0.45

Tested by

no test coverage detected