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

Skip to content

Commit ac5cfae

Browse files
committed
MNT : fix bug in qt5 event handling
Reported to the matplotlib-user mailing list http://matplotlib.1069221.n5.nabble.com/Event-errors-in-qt5-backend-after-recent-commit-td44969.html Fixes bug introduced in b72e0cd The event and leave events were already being passed the gui event as those handlers take no other arguments.
1 parent 5207be5 commit ac5cfae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/backend_qt5.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,11 @@ def __timerEvent(self, event):
248248
self.mpl_idle_event(event)
249249

250250
def enterEvent(self, event):
251-
FigureCanvasBase.enter_notify_event(self, event, guiEvent=event)
251+
FigureCanvasBase.enter_notify_event(self, guiEvent=event)
252252

253253
def leaveEvent(self, event):
254254
QtWidgets.QApplication.restoreOverrideCursor()
255-
FigureCanvasBase.leave_notify_event(self, event, guiEvent=event)
255+
FigureCanvasBase.leave_notify_event(self, guiEvent=event)
256256

257257
def mousePressEvent(self, event):
258258
x = event.pos().x()

0 commit comments

Comments
 (0)