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
Currently, pick events are generated by button_press and scroll events,
which call canvas.pick, which itself checks the widgetlock and then
calls Figure.pick, which is actually Artist.pick; Artist.pick checks
whether to emit a PickEvent for the current artist, then calls itself
recursively on children artists.
This PR gets rid of the intermediate canvas.pick layer, moving the
widgetlock check to Figure.pick (Figure.pick still calls the super()
pick, i.e. Artist.pick, after the check). The advantages are that 1)
this avoids colliding with pick methods that may be present in the
native GUI classes (this is not a theoretical case: see the changes in
the GTK4 case) and 2) this makes it easier to fix button_pick_id and
scroll_pick_id to use picklable connections (which they should do). In
the old implementation, lambdas were not picklable, and one could not
write e.g. `mpl_connect("button_press_event", self.canvas.pick)` because
that would not handle canvas swapping.
0 commit comments