diff --git a/FlatCAMApp.py b/FlatCAMApp.py index b2f9475a..77f501d3 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -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 diff --git a/README.md b/README.md index 8e7730d3..d1c32a14 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/flatcamGUI/VisPyCanvas.py b/flatcamGUI/VisPyCanvas.py index cd7a41a1..cc9aab7d 100644 --- a/flatcamGUI/VisPyCanvas.py +++ b/flatcamGUI/VisPyCanvas.py @@ -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) diff --git a/flatcamTools/ToolFilm.py b/flatcamTools/ToolFilm.py index dadd4d39..c26656b1 100644 --- a/flatcamTools/ToolFilm.py +++ b/flatcamTools/ToolFilm.py @@ -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() diff --git a/requirements.txt b/requirements.txt index 8407fc7c..259ef455 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 \ No newline at end of file