- solved issue #355 - when the tool diameter field in the Edit → Preferences → Geometry → Geometry General → Tools → Tool dia is only one the app failed to read it
This commit is contained in:
@@ -3879,15 +3879,18 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
||||
if def_key == opt_key:
|
||||
self.default_data[def_key] = deepcopy(opt_val)
|
||||
|
||||
try:
|
||||
temp_tools = self.options["cnctooldia"].split(",")
|
||||
tools_list = [
|
||||
float(eval(dia)) for dia in temp_tools if dia != ''
|
||||
]
|
||||
except Exception as e:
|
||||
log.error("At least one tool diameter needed. Verify in Edit -> Preferences -> Geometry General -> "
|
||||
"Tool dia. %s" % str(e))
|
||||
return
|
||||
if type(self.options["cnctooldia"]) == float:
|
||||
tools_list = [self.options["cnctooldia"]]
|
||||
else:
|
||||
try:
|
||||
temp_tools = self.options["cnctooldia"].split(",")
|
||||
tools_list = [
|
||||
float(eval(dia)) for dia in temp_tools if dia != ''
|
||||
]
|
||||
except Exception as e:
|
||||
log.error("FlatCAMGeometry.set_ui() -> At least one tool diameter needed. "
|
||||
"Verify in Edit -> Preferences -> Geometry General -> Tool dia. %s" % str(e))
|
||||
return
|
||||
|
||||
self.tooluid += 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user