Skip to content

Commit 39a7d13

Browse files
committed
Fix Qt6 TypeError in tests/unit/utils.py
1 parent 93a4b9d commit 39a7d13

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plotpy/tests/unit/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ def mouse_event_at_relative_plot_pos(
7777
relative_xy[0] * size.width(),
7878
relative_xy[1] * size.height(),
7979
)
80-
canva_pos = QC.QPointF(pos_x, pos_y).toPoint()
81-
glob_pos = QC.QPointF(canvas.mapToGlobal(canva_pos))
80+
canvas_pos = QC.QPointF(pos_x, pos_y)
81+
glob_pos = QC.QPointF(canvas.mapToGlobal(canvas_pos.toPoint()))
8282

8383
for type_ in click_types:
8484
mouse_event_press = QG.QMouseEvent(
8585
type_,
86-
canva_pos,
86+
canvas_pos,
8787
glob_pos,
8888
QC.Qt.MouseButton.LeftButton,
8989
QC.Qt.MouseButton.LeftButton,

0 commit comments

Comments
 (0)