The Wayback Machine - https://web.archive.org/web/20240106174003/https://github.com/matplotlib/matplotlib/issues/27380
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH]: pick event should be called after mouse pressed event #27380

Open
HendrikHuebner opened this issue Nov 27, 2023 · 0 comments
Open

[ENH]: pick event should be called after mouse pressed event #27380

HendrikHuebner opened this issue Nov 27, 2023 · 0 comments

Comments

@HendrikHuebner
Copy link

HendrikHuebner commented Nov 27, 2023

Problem

Currently the pick event is fired before the mouse pressed event. This makes detecting a situation where the user has clicked the plot but not selected anything very difficult. I'm currently facing this exact problem working on an application that embedds mpl plots into a Qt GUI. The only solutions we could come up with are either saving a timestamp for the last pick event and checking whether the mouse pressed event occured right after or just manually writing our own pick detection inside of the mouse pressed event.

Proposed solution

Changing the order of these events would save us from a lot of head aches. The reverse sitation would no be a problem either since the developer knows that a mouse press event has to fire beforea pick event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant