Skip to content

Clarify scope of MouseEvent attributes #14188

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

Merged
merged 1 commit into from
May 12, 2019

Conversation

timhoffm
Copy link
Member

PR Summary

MouseEvent is a generic class for all mouse events. Some of its attributes do not have a meaning for specific events. This PR documents that.

Closes #4001.

Whether the event is a double-click.
Whether the event is a double-click. This applies only to
'button_press_event' and is False otherwise. In particular, it's
not used in 'button_release_event'.
Copy link
Contributor

@anntzer anntzer May 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"not used" -> "never set"? "always False"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhh, these don't really match my intention. "never set" and "always False" both sound like the value is still meaningful but has a fixed value. I really would like to emphsize that for button_release_event dblclick is not part of the logic/API.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me whether "not used" means "the attribute does not exist" or "the attribute exists but can take any value, which is meaningless" (well I guess that's more a problem in C (uninitialized variable)) or "is always False".
Anyways, it's not a big deal, feel free to self-merge if you're not going to change this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to merge as is since I don't have an idea how to express this more clearly without getting very verbose. Anyway, it's an improvement.

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy with this wording, but do not want to merge over @anntzer 's concern.

@tacaswell tacaswell modified the milestones: v3.1.1, v3.1.0 May 11, 2019
@timhoffm timhoffm merged commit a4d82fe into matplotlib:master May 12, 2019
@timhoffm timhoffm deleted the mouseevent-dblclick branch May 12, 2019 09:28
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request May 12, 2019
timhoffm added a commit that referenced this pull request May 12, 2019
…188-on-v3.1.x

Backport PR #14188 on branch v3.1.x (Clarify scope of MouseEvent attributes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Qt5 Backend: dblclick is always False on 'mouse_release_event'
3 participants