- 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

@@ -108,10 +108,17 @@ class VisPyCanvas(scene.SceneCanvas):
# self.measure_fps()
def translate_coords(self, pos):
"""
Translate pixels to FlatCAM units.
"""
tr = self.grid.get_transform('canvas', 'visual')
return tr.map(pos)
def translate_coords_2(self, pos):
"""
Translate FlatCAM units to pixels.
"""
tr = self.grid.get_transform('visual', 'document')
return tr.map(pos)