- fixed issue #319 where generating a CNCJob from a geometry made with NCC Tool made the app crash

- replaced in FlatCAM Tools and in FLatCAMObj.py  and in Editors all references to hardcoded decimals in string formats for tools with a variable declared in the __init__()
This commit is contained in:
Marius Stanciu
2019-09-28 23:58:23 +03:00
committed by Marius
parent 32ff417a2c
commit f47d9cf3d2
9 changed files with 229 additions and 145 deletions

View File

@@ -3104,6 +3104,9 @@ class FlatCAMGeoEditor(QtCore.QObject):
self.rtree_index = rtindex.Index()
# Number of decimals used by tools in this class
self.decimals = 4
def entry2option(option, entry):
try:
self.options[option] = float(entry.text())
@@ -3602,6 +3605,14 @@ class FlatCAMGeoEditor(QtCore.QObject):
self.replot()
# updated units
self.units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().upper()
if self.units == "IN":
self.decimals = 4
else:
self.decimals = 2
# start with GRID toolbar activated
if self.app.ui.grid_snap_btn.isChecked() is False:
self.app.ui.grid_snap_btn.trigger()