- some fixes on the app.jump_to() method

- made sure that the ToolFilm will not start saving a file if there are no objects loaded
This commit is contained in:
Marius Stanciu
2019-12-09 21:53:57 +02:00
committed by Marius
parent 35f518ace5
commit face1d0f64
5 changed files with 23 additions and 6 deletions

View File

@@ -7346,7 +7346,11 @@ class App(QtCore.QObject):
canvas_origin = self.plotcanvas.native.mapToGlobal(QtCore.QPoint(0, 0))
jump_loc = self.plotcanvas.translate_coords_2((cal_location[0], cal_location[1]))
j_pos = (canvas_origin.x() + jump_loc[0], (canvas_origin.y() + jump_loc[1]))
j_pos = (
int(canvas_origin.x() + round(jump_loc[0])),
int(canvas_origin.y() + round(jump_loc[1]))
)
cursor.setPos(j_pos[0], j_pos[1])
else:
# find the canvas origin which is in the top left corner