Closed roomrys closed 3 months ago
The recent changes enhance mouse wheel interactions in the sleap/gui/widgets/video.py
file, specifically focusing on zooming and rotating functionalities. These updates provide a more intuitive user experience by refining event handling and optimizing application stability. The logic now ensures that only relevant components respond to events, improving performance and responsiveness during interactions.
Files | Change Summary |
---|---|
sleap/gui/widgets/video.py |
Improved wheelEvent methods for zoom and rotation; clarified documentation; restricted event handling for stability; updated rotation calculation for better responsiveness. |
tests/gui/test_video_player.py |
Added test_wheelEvent to specifically test wheelEvent functionality; cleaned up previous test code for focus and relevance. |
🐰 In the garden where the pixels play,
A rabbit hops with joy today!
With every scroll, the view does zoom,
Twirling images, bringing life to the room.
No crashes now, just smooth delight,
As we dance through frames, oh what a sight! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 50.00000%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 74.37%. Comparing base (
7ed1229
) to head (ea1316e
). Report is 26 commits behind head on develop.
Files | Patch % | Lines |
---|---|---|
sleap/gui/widgets/video.py | 50.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
Prior to this PR, we were experiencing a GUI crash when scrolling while using newer dependencies. The crash seemed to occur when we called
wheelEvent
on children that did not properly handle theevent
.This PR only passes the
wheelEvent
onto children that require the event for rotation (which is why we passed thewheelEvent
to children in the first place). The GUI no longer crashes when handlingwheelEvent
.Also,
QWheelEvent.delta
is depreciated in PySIde6, so we useQWheelEvent.angleDelta
instead (which is already used in our code elsewhere and supported by both PySide6 and PySide2).Types of changes
Does this address any currently open issues?
1802
Outside contributors checklist
Thank you for contributing to SLEAP!
:heart:
Summary by CodeRabbit
New Features
Bug Fixes
Tests
wheelEvent
method, enhancing overall test coverage for the application's GUI interactions.