You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: stop responding in demo program "matplotlib/examples/event_handling/lasso_demo.py" #25137
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.
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.
a) Function lasso should return the boolean value "a legal lasso has been thrown", so that in (in case True) a self.canvas.widgetlock(self.lasso) whoul make sense.
b) Function lasso itself should call canvas.widgetlock(), because ist has to be done anyway (if the is a real lasso drawn); a new parameter canvas must be passed over to function lasso.
Activity
Igittigitt24 commentedon Feb 4, 2023
a) Function lasso should return the boolean value "a legal lasso has been thrown", so that in (in case True) a self.canvas.widgetlock(self.lasso) whoul make sense.
b) Function lasso itself should call canvas.widgetlock(), because ist has to be done anyway (if the is a real lasso drawn); a new parameter canvas must be passed over to function lasso.