-
Notifications
You must be signed in to change notification settings - Fork 83
silx.gui.plot.PlotWidget: Fixed matplotlib backend wheel support #4686
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1704,18 +1704,31 @@ def wheelEvent(self, event): | |
| # Fix here as we want to be able to use alt modifier in silx plot. | ||
| # https://github.com/silx-kit/silx/pull/4631 | ||
| if event.angleDelta().y() == 0: | ||
| event = qt.QWheelEvent( | ||
| event.position(), | ||
| event.globalPosition(), | ||
| event.pixelDelta(), | ||
| qt.QPoint(0, event.angleDelta().x()), | ||
| event.buttons(), | ||
| event.modifiers(), | ||
| event.phase(), | ||
| event.isInverted(), | ||
| event.source(), | ||
| event.pointingDevice(), | ||
| ) | ||
| if qt.BINDING == "PyQt5": | ||
| event = qt.QWheelEvent( | ||
| event.position(), | ||
| event.globalPosition(), | ||
| event.pixelDelta(), | ||
| qt.QPoint(0, event.angleDelta().x()), | ||
| event.buttons(), | ||
| event.modifiers(), | ||
| event.phase(), | ||
| event.inverted(), | ||
| qt.Qt.MouseEventSynthesizedByApplication, | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| ) | ||
| else: | ||
| event = qt.QWheelEvent( | ||
| event.position(), | ||
| event.globalPosition(), | ||
| event.pixelDelta(), | ||
| qt.QPoint(0, event.angleDelta().x()), | ||
| event.buttons(), | ||
| event.modifiers(), | ||
| event.phase(), | ||
| event.inverted(), | ||
| qt.Qt.MouseEventSynthesizedByApplication, | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| event.pointingDevice(), | ||
| ) | ||
| super().wheelEvent(event) | ||
| return | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here, there is no
isInverted, it'sinvertedhttps://doc.qt.io/qt-6/qwheelevent.html#inverted-prop