File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,16 +71,14 @@ def mouse_event_at_relative_plot_pos(
7171 plot = win .manager .get_plot ()
7272
7373 plot = win .manager .get_plot ()
74- canva : QW .QWidget = plot .canvas () # type: ignore
75- size = canva .size ()
74+ canvas : QW .QWidget = plot .canvas () # type: ignore
75+ size = canvas .size ()
7676 pos_x , pos_y = (
7777 relative_xy [0 ] * size .width (),
7878 relative_xy [1 ] * size .height (),
7979 )
80- # pos_x, pos_y = axes_to_canvas(plot.get_active_item(), x, y)
8180 canva_pos = QC .QPointF (pos_x , pos_y ).toPoint ()
82- glob_pos = canva .mapToGlobal (canva_pos )
83- # QTest.mouseClick(canva, QC.Qt.MouseButton.LeftButton, mod, canva_pos)
81+ glob_pos = QC .QPointF (canvas .mapToGlobal (canva_pos ))
8482
8583 for type_ in click_types :
8684 mouse_event_press = QG .QMouseEvent (
@@ -91,7 +89,7 @@ def mouse_event_at_relative_plot_pos(
9189 QC .Qt .MouseButton .LeftButton ,
9290 mod ,
9391 )
94- qapp .sendEvent (canva , mouse_event_press )
92+ qapp .sendEvent (canvas , mouse_event_press )
9593
9694
9795def drag_mouse (
You can’t perform that action at this time.
0 commit comments