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

[FIX] view: Fix a type error with PyQt6 #285

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

ales-erjavec
Copy link
Collaborator

Issue

Using pinch gesture on the canvas when using PyQt6 causes an error

----------------------------------------------------------------------
Traceback (most recent call last):
 ...
  File "/home/ales/devel/orange-canvas-core/orangecanvas/canvas/view.py", line 199, in __setZoomLevel
    self.centerOn(anchor + diff)
                  ~~~~~~~^~~~~~
TypeError: unsupported operand type(s) for +: 'QPoint' and 'QPointF'

----------------------------------------------------------------------

Changes

Cast the anchor to QPointF

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (636c6b3) 75.49% compared to head (9ca81e3) 75.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #285      +/-   ##
==========================================
+ Coverage   75.49%   75.51%   +0.01%     
==========================================
  Files          99       99              
  Lines       21043    21043              
==========================================
+ Hits        15886    15890       +4     
+ Misses       5157     5153       -4     
Files Coverage Δ
orangecanvas/canvas/view.py 50.27% <100.00%> (+2.18%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@janezd janezd merged commit 577aa0c into biolab:master Oct 19, 2023
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants