From ac5cfae066e094381603f0c0af61fabf3f32418c Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 18 Feb 2015 22:01:29 -0500 Subject: [PATCH] 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 b72e0cd9e63f7cf4bec2908143c62c23666b674a The event and leave events were already being passed the gui event as those handlers take no other arguments. --- lib/matplotlib/backends/backend_qt5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/backends/backend_qt5.py b/lib/matplotlib/backends/backend_qt5.py index 4f5baf544f74..9526422a0266 100644 --- a/lib/matplotlib/backends/backend_qt5.py +++ b/lib/matplotlib/backends/backend_qt5.py @@ -248,11 +248,11 @@ def __timerEvent(self, event): self.mpl_idle_event(event) def enterEvent(self, event): - FigureCanvasBase.enter_notify_event(self, event, guiEvent=event) + FigureCanvasBase.enter_notify_event(self, guiEvent=event) def leaveEvent(self, event): QtWidgets.QApplication.restoreOverrideCursor() - FigureCanvasBase.leave_notify_event(self, event, guiEvent=event) + FigureCanvasBase.leave_notify_event(self, guiEvent=event) def mousePressEvent(self, event): x = event.pos().x()