MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / MouseLeftUp

Method MouseLeftUp

gui/builtinShipBrowser/fitItem.py:381–409  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

379 wx.PostEvent(self.shipBrowser, Stage3Selected(shipID=self.shipID))
380
381 def MouseLeftUp(self, event):
382 if self.dragging and self.dragged:
383 self.OnMouseCaptureLost(event)
384
385 targetWnd, _ = wx.FindWindowAtPointer()
386
387 if not targetWnd:
388 return
389
390 wnd = targetWnd
391 while wnd is not None:
392 handler = getattr(wnd, "handleDrag", None)
393 if handler:
394 handler("fit", self.fitID)
395 break
396 else:
397 wnd = wnd.Parent
398 event.Skip()
399 return
400
401 if self.dragging:
402 self.dragging = False
403
404 if self.tcFitName.IsShown():
405 self.RestoreEditButton()
406 else:
407 activeFitID = self.mainFrame.getActiveFit()
408 if activeFitID != self.fitID:
409 self.selectFit()
410
411 def MouseLeftDown(self, event):
412 self.dragging = True

Callers

nothing calls this directly

Calls 4

OnMouseCaptureLostMethod · 0.95
RestoreEditButtonMethod · 0.95
selectFitMethod · 0.95
getActiveFitMethod · 0.45

Tested by

no test coverage detected