biolab / orange-canvas-core

Orange Canvas core workflow editor
GNU General Public License v3.0
36 stars 62 forks source link

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

Closed ales-erjavec closed 11 months ago

ales-erjavec commented 11 months ago

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 commented 11 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/285?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab) | Coverage Δ | | |---|---|---| | [orangecanvas/canvas/view.py](https://app.codecov.io/gh/biolab/orange-canvas-core/pull/285?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL2NhbnZhcy92aWV3LnB5) | `50.27% <100.00%> (+2.18%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.