- 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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user