- 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

View File

@ -15,13 +15,15 @@ CAD program, and create G-Code for Isolation routing.
- Calibration Tool - added preferences values
- Calibration Tool - more work on it
- reverted this change: "selected object in Project used to ask twice for UI build" because it will not build the UI when a tab is closed for Document object and the object is selected
- fixed issue after Geometry object edit; the GCode made from and edited object did not reflect the changes in the object
- fixed issue after Geometry object edit; the GCode made from an edited object did not reflect the changes in the object
- in Object UI, the Scale FCDoubleSpinner will no longer work for Return key press due of issues of unwanted scaling on focusOut event
- in FlatCAMGeometry fixed the scale and offset methods to always process the self.solid_geometry
- Calibration Tool - finished the calibrated object creation method
- updated the POT file
- fixed an error in the German PO file
- updated the languages PO files
- 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
8.12.2019

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)

View File

@ -669,6 +669,10 @@ class Film(FlatCAMTool):
_("No FlatCAM object selected. Load an object for Box and retry."))
return
if name == '' or boxname == '':
self.app.inform.emit('[ERROR_NOTCL] %s' % _("No FlatCAM object selected."))
return
scale_stroke_width = float(self.film_scale_stroke_entry.get_value())
source = self.source_punch.get_value()
file_type = self.file_type_radio.get_value()

View File

@ -1,11 +1,11 @@
# This file contains python only requirements to be installed with pip
# Python packages that cannot be installed with pip (e.g. PyQt5, GDAL) are not included.
# Usage: pip3 install -r requirements.txt
numpy>=1.16
numpy >=1.16
matplotlib>=3.1
cycler>=0.10
python-dateutil>=2.1
kiwisolver>=1.0.1
kiwisolver>=1.1
six
setuptools
dill
@ -21,6 +21,6 @@ fontTools
rasterio
lxml
ezdxf
qrcode>=6.0
reportlab>=3.0
qrcode>=6.1
reportlab>=3.5
svglib