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

Method OnLeftUp

gui/builtinMarketBrowser/pfSearchBox.py:164–193  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

162 self.Refresh()
163
164 def OnLeftUp(self, event):
165 btnpos = self.GetButtonsPos()
166 btnsize = self.GetButtonsSize()
167
168 if self.HasCapture():
169 self.ReleaseMouse()
170
171 for btn in range(2):
172 if self.HitTest(btnpos[btn], event.GetPosition(), btnsize[btn]):
173 if btn == 0:
174 if self.searchButtonPressed:
175 self.searchButtonPressed = False
176 self.Refresh()
177 self.SetFocus()
178 wx.PostEvent(self, SearchButton())
179 if btn == 1:
180 if self.cancelButtonPressed:
181 self.cancelButtonPressed = False
182 self.Refresh()
183 self.SetFocus()
184 wx.PostEvent(self, CancelButton())
185 else:
186 if btn == 0:
187 if self.searchButtonPressed:
188 self.searchButtonPressed = False
189 self.Refresh()
190 if btn == 1:
191 if self.cancelButtonPressed:
192 self.cancelButtonPressed = False
193 self.Refresh()
194
195 def OnSize(self, event):
196 self.resized = True

Callers

nothing calls this directly

Calls 5

GetButtonsPosMethod · 0.95
GetButtonsSizeMethod · 0.95
HitTestMethod · 0.95
GetPositionMethod · 0.45
RefreshMethod · 0.45

Tested by

no test coverage detected