- 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:
parent
b1b140634b
commit
9e8536ab9f
|
@ -11531,26 +11531,28 @@ class App(QtCore.QObject):
|
||||||
App.log.debug(" **************** Started PROEJCT loading... **************** ")
|
App.log.debug(" **************** Started PROEJCT loading... **************** ")
|
||||||
|
|
||||||
for obj in d['objs']:
|
for obj in d['objs']:
|
||||||
def obj_init(obj_inst, app_inst):
|
try:
|
||||||
|
def obj_init(obj_inst, app_inst):
|
||||||
|
|
||||||
obj_inst.from_dict(obj)
|
obj_inst.from_dict(obj)
|
||||||
|
|
||||||
App.log.debug("Recreating from opened project an %s object: %s" %
|
App.log.debug("Recreating from opened project an %s object: %s" %
|
||||||
(obj['kind'].capitalize(), obj['options']['name']))
|
(obj['kind'].capitalize(), obj['options']['name']))
|
||||||
|
|
||||||
# for some reason, setting ui_title does not work when this method is called from Tcl Shell
|
# for some reason, setting ui_title does not work when this method is called from Tcl Shell
|
||||||
# it's because the TclCommand is run in another thread (it inherit TclCommandSignaled)
|
# it's because the TclCommand is run in another thread (it inherit TclCommandSignaled)
|
||||||
if cli is None:
|
if cli is None:
|
||||||
self.set_ui_title(name="{} {}: {}".format(_("Loading Project ... restoring"),
|
self.set_ui_title(name="{} {}: {}".format(_("Loading Project ... restoring"),
|
||||||
obj['kind'].upper(),
|
obj['kind'].upper(),
|
||||||
obj['options']['name']
|
obj['options']['name']
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
self.new_object(obj['kind'], obj['options']['name'], obj_init, active=False, fit=False, plot=plot)
|
self.new_object(obj['kind'], obj['options']['name'], obj_init, active=False, fit=False, plot=plot)
|
||||||
|
except Exception as e:
|
||||||
|
print('App.open_project() --> ' + str(e))
|
||||||
|
|
||||||
self.inform.emit('[success] %s: %s' %
|
self.inform.emit('[success] %s: %s' % (_("Project loaded from"), filename))
|
||||||
(_("Project loaded from"), filename))
|
|
||||||
|
|
||||||
self.should_we_save = False
|
self.should_we_save = False
|
||||||
self.file_opened.emit("project", filename)
|
self.file_opened.emit("project", filename)
|
||||||
|
|
|
@ -3879,15 +3879,18 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
||||||
if def_key == opt_key:
|
if def_key == opt_key:
|
||||||
self.default_data[def_key] = deepcopy(opt_val)
|
self.default_data[def_key] = deepcopy(opt_val)
|
||||||
|
|
||||||
try:
|
if type(self.options["cnctooldia"]) == float:
|
||||||
temp_tools = self.options["cnctooldia"].split(",")
|
tools_list = [self.options["cnctooldia"]]
|
||||||
tools_list = [
|
else:
|
||||||
float(eval(dia)) for dia in temp_tools if dia != ''
|
try:
|
||||||
]
|
temp_tools = self.options["cnctooldia"].split(",")
|
||||||
except Exception as e:
|
tools_list = [
|
||||||
log.error("At least one tool diameter needed. Verify in Edit -> Preferences -> Geometry General -> "
|
float(eval(dia)) for dia in temp_tools if dia != ''
|
||||||
"Tool dia. %s" % str(e))
|
]
|
||||||
return
|
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
|
self.tooluid += 1
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ CAD program, and create G-Code for Isolation routing.
|
||||||
- ~~when the selection is changed in the Project Tree the selection shape on canvas is deleted~~
|
- ~~when the selection is changed in the Project Tree the selection shape on canvas is deleted~~
|
||||||
- if an object is selected on Project Tree and it does not have the selection shape drawn, first click on canvas over it will draw the selection shape
|
- if an object is selected on Project Tree and it does not have the selection shape drawn, first click on canvas over it will draw the selection shape
|
||||||
- in Tool Transform added a new feature named 'Buffer'. For Geometry and Gerber objects will create (and replace) a geometry at a distance from the original geometry and for Excellon will adjust the Tool diameters
|
- in Tool Transform added a new feature named 'Buffer'. For Geometry and Gerber objects will create (and replace) a geometry at a distance from the original geometry and for Excellon will adjust the Tool diameters
|
||||||
|
- 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
|
||||||
|
|
||||||
22.12.2019
|
22.12.2019
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue