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

Method OnMplCanvasRelease

graphs/gui/canvasPanel.py:342–354  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

340 self.markXApproximate(event.xdata)
341
342 def OnMplCanvasRelease(self, event):
343 if event.button == 1:
344 if self.mplOnDragHandler:
345 self.canvas.mpl_disconnect(self.mplOnDragHandler)
346 self.mplOnDragHandler = None
347 if self.mplOnReleaseHandler:
348 self.canvas.mpl_disconnect(self.mplOnReleaseHandler)
349 self.mplOnReleaseHandler = None
350 # Do not write markX here because of strange mouse behavior: when dragging,
351 # sometimes when you release button, x coordinate changes. To avoid that,
352 # we just re-use coordinates set on click/drag and just request to redraw
353 # using accurate data
354 self.draw(accurateMarks=True)

Callers

nothing calls this directly

Calls 1

drawMethod · 0.95

Tested by

no test coverage detected