Description
Bug summary
The demo shows some points. You may surround some of them with a "lasso" (pressing the left mouse button an moving the cursor arround) and then these points are displayed in a different colour. Trying another lasso, other points will be coloured and so on.
But if you just click the left mouse button once and DO NOT MOVE THE CURSOR, then the program hangs and no other lassos can be thrown.
Code for reproduction
just matplotlib/examples/event_handling/lasso_demo.py
just try
Actual outcome
none, as described in bug summary
Expected outcome
The program should ignore such a behaviour (only click one + no move) and then should produce a correct set of coloured points on a further lasso example.
Additional information
The function "lasso" does not recognize, that NO movement happens.
But in the demo file after EVERY lasso call a
# acquire a lock on the widget drawing
self.canvas.widgetlock(self.lasso)
is executed, so that the program is unable to receive another "lasso" if the error mentioned above appears.
Operating system
win 10
Matplotlib Version
3.5.1
Matplotlib Backend
TkAgg
Python version
3.8.10
Jupyter version
No response
Installation
pip