Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d99430e

Browse files
author
Stefan Mitic
committed
fix: initialize LocationEvent after button def
1 parent ac0bd8f commit d99430e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1394,14 +1394,16 @@ def __init__(self, name, canvas, x, y, button=None, key=None,
13941394
(*x*, *y*) in figure coords ((0, 0) = bottom left)
13951395
button pressed None, 1, 2, 3, 'up', 'down'
13961396
"""
1397-
LocationEvent.__init__(self, name, canvas, x, y, guiEvent=guiEvent)
13981397
if button in MouseButton.__members__.values():
13991398
button = MouseButton(button)
14001399
self.button = button
14011400
self.key = key
14021401
self.step = step
14031402
self.dblclick = dblclick
14041403

1404+
LocationEvent.__init__(self, name, canvas, x, y, guiEvent=guiEvent)
1405+
1406+
14051407
def __str__(self):
14061408
return (f"{self.name}: "
14071409
f"xy=({self.x}, {self.y}) xydata=({self.xdata}, {self.ydata}) "

0 commit comments

Comments
 (0)