- changed the name of the new object FlatCAMNotes to a more general one FlatCAMDocument

- changed the way a new FlatCAMScript object is made, the method that is processing the Tcl commands when the Run button is clicked is moved to the FlatCAMObj.FlatCAMScript() class
- reused the Multiprocessing Pool declared in the App for the ToolRulesCheck() class
- adapted the Project context menu for the new types of FLatCAM objects
- modified the setup_recent_files to accommodate the new FlatCAM objects
- made sure that when an FlatCAM script object is deleted, it's associated Tab is closed
This commit is contained in:
Marius Stanciu
2019-10-02 17:58:48 +03:00
parent 83f229ed9e
commit a75bdfb29d
8 changed files with 541 additions and 816 deletions

View File

@@ -47,7 +47,7 @@ class TclCommandCncjob(TclCommandSignaled):
])
# array of mandatory options for current Tcl command: required = {'name','outname'}
required = ['name']
required = []
# structured help for current command, args needs to be ordered
help = {
@@ -88,16 +88,24 @@ class TclCommandCncjob(TclCommandSignaled):
:return: None or exception
"""
name = args['name']
if 'outname' not in args:
args['outname'] = str(name) + "_cnc"
name = ''
if 'muted' in args:
muted = args['muted']
else:
muted = 0
try:
name = args['name']
except KeyError:
if muted == 0:
self.raise_tcl_error("Object name is missing")
else:
return "fail"
if 'outname' not in args:
args['outname'] = str(name) + "_cnc"
obj = self.app.collection.get_by_name(str(name), isCaseSensitive=False)
if obj is None: