- 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:
parent
35f518ace5
commit
face1d0f64
|
@ -7346,7 +7346,11 @@ class App(QtCore.QObject):
|
||||||
|
|
||||||
canvas_origin = self.plotcanvas.native.mapToGlobal(QtCore.QPoint(0, 0))
|
canvas_origin = self.plotcanvas.native.mapToGlobal(QtCore.QPoint(0, 0))
|
||||||
jump_loc = self.plotcanvas.translate_coords_2((cal_location[0], cal_location[1]))
|
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])
|
cursor.setPos(j_pos[0], j_pos[1])
|
||||||
else:
|
else:
|
||||||
# find the canvas origin which is in the top left corner
|
# find the canvas origin which is in the top left corner
|
||||||
|
|
|
@ -15,13 +15,15 @@ CAD program, and create G-Code for Isolation routing.
|
||||||
- Calibration Tool - added preferences values
|
- Calibration Tool - added preferences values
|
||||||
- Calibration Tool - more work on it
|
- 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
|
- 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 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
|
- in FlatCAMGeometry fixed the scale and offset methods to always process the self.solid_geometry
|
||||||
- Calibration Tool - finished the calibrated object creation method
|
- Calibration Tool - finished the calibrated object creation method
|
||||||
- updated the POT file
|
- updated the POT file
|
||||||
- fixed an error in the German PO file
|
- fixed an error in the German PO file
|
||||||
- updated the languages PO files
|
- 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
|
8.12.2019
|
||||||
|
|
||||||
|
|
|
@ -108,10 +108,17 @@ class VisPyCanvas(scene.SceneCanvas):
|
||||||
# self.measure_fps()
|
# self.measure_fps()
|
||||||
|
|
||||||
def translate_coords(self, pos):
|
def translate_coords(self, pos):
|
||||||
|
"""
|
||||||
|
Translate pixels to FlatCAM units.
|
||||||
|
|
||||||
|
"""
|
||||||
tr = self.grid.get_transform('canvas', 'visual')
|
tr = self.grid.get_transform('canvas', 'visual')
|
||||||
return tr.map(pos)
|
return tr.map(pos)
|
||||||
|
|
||||||
def translate_coords_2(self, pos):
|
def translate_coords_2(self, pos):
|
||||||
|
"""
|
||||||
|
Translate FlatCAM units to pixels.
|
||||||
|
"""
|
||||||
tr = self.grid.get_transform('visual', 'document')
|
tr = self.grid.get_transform('visual', 'document')
|
||||||
return tr.map(pos)
|
return tr.map(pos)
|
||||||
|
|
||||||
|
|
|
@ -669,6 +669,10 @@ class Film(FlatCAMTool):
|
||||||
_("No FlatCAM object selected. Load an object for Box and retry."))
|
_("No FlatCAM object selected. Load an object for Box and retry."))
|
||||||
return
|
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())
|
scale_stroke_width = float(self.film_scale_stroke_entry.get_value())
|
||||||
source = self.source_punch.get_value()
|
source = self.source_punch.get_value()
|
||||||
file_type = self.file_type_radio.get_value()
|
file_type = self.file_type_radio.get_value()
|
||||||
|
|
|
@ -5,7 +5,7 @@ numpy>=1.16
|
||||||
matplotlib>=3.1
|
matplotlib>=3.1
|
||||||
cycler>=0.10
|
cycler>=0.10
|
||||||
python-dateutil>=2.1
|
python-dateutil>=2.1
|
||||||
kiwisolver>=1.0.1
|
kiwisolver>=1.1
|
||||||
six
|
six
|
||||||
setuptools
|
setuptools
|
||||||
dill
|
dill
|
||||||
|
@ -21,6 +21,6 @@ fontTools
|
||||||
rasterio
|
rasterio
|
||||||
lxml
|
lxml
|
||||||
ezdxf
|
ezdxf
|
||||||
qrcode>=6.0
|
qrcode>=6.1
|
||||||
reportlab>=3.0
|
reportlab>=3.5
|
||||||
svglib
|
svglib
|
Loading…
Reference in New Issue