I agree, the if clause should not be there, and have removed it from
cvs. If the state information is required it should be passed as an
argument to FigureCanvasBase.motion_notify_event() , like x and y are.
Send instant messages to your online friends http://au.messenger.yahoo.com
On Wed, 2005-07-20 at 20:27 -0700, email@example.com wrote:
I just upgraded my matplotlib from 0.80 to to 0.83.1 and discovered a bug in the GTK backend. To be specific, the following code, beginning by line 171 in backend_gtk.py, is the problem:
def motion_notify_event(self, widget, event):
x, y, state = event.window.get_pointer()
x = event.x
y = event.y
state = event.state
# flipy so y=0 is bottom of canvas
y = self.figure.bbox.height() - y
FigureCanvasBase.motion_notify_event(self, x, y)
Due to the 'if state' clause, the Canvas will only receive the 'motion_notify_event' if at the same time the mouse button is pressed. This has not been the case in previous version of matplotlib. There is e.g. no such distinction in backend_qt.py.