- fixed not adding the feedrate code in drillcncjob Tcl command
- fixed crash when trying to do a `select all` and there are app Scripts present - updated the `drillcncjob` Tcl command to make a script exit in case of an error
This commit is contained in:
@@ -117,7 +117,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
||||
...
|
||||
}
|
||||
It is populated in the ExcellonObject.on_create_cncjob_click() but actually
|
||||
it's done in camlib.CNCJob.generate_from_excellon_by_tool()
|
||||
it's done in camlib.CNCJob.tcl_gcode_from_excellon_by_tool()
|
||||
BEWARE: I rely on the ordered nature of the Python 3.7 dictionary. Things might change ...
|
||||
'''
|
||||
self.tools = {}
|
||||
|
||||
@@ -164,14 +164,14 @@ class DocumentObject(FlatCAMObj):
|
||||
|
||||
# try to not add too many times a tab that it is already installed
|
||||
for idx in range(self.app.ui.plot_tab_area.count()):
|
||||
if self.app.ui.plot_tab_area.widget(idx).objectName() == self.options['name']:
|
||||
if self.app.ui.plot_tab_area.widget(idx).objectName() == self.options['name'] + "_editor_tab":
|
||||
tab_here = True
|
||||
break
|
||||
|
||||
# add the tab if it is not already added
|
||||
if tab_here is False:
|
||||
self.app.ui.plot_tab_area.addTab(self.document_editor_tab, '%s' % _("Document Editor"))
|
||||
self.document_editor_tab.setObjectName(self.options['name'])
|
||||
self.document_editor_tab.setObjectName(self.options['name'] + "_editor_tab")
|
||||
|
||||
# Switch plot_area to CNCJob tab
|
||||
self.app.ui.plot_tab_area.setCurrentWidget(self.document_editor_tab)
|
||||
|
||||
@@ -148,14 +148,14 @@ class ScriptObject(FlatCAMObj):
|
||||
tab_here = False
|
||||
# try to not add too many times a tab that it is already installed
|
||||
for idx in range(self.app.ui.plot_tab_area.count()):
|
||||
if self.app.ui.plot_tab_area.widget(idx).objectName() == self.options['name']:
|
||||
if self.app.ui.plot_tab_area.widget(idx).objectName() == (self.options['name'] + "_editor_tab"):
|
||||
tab_here = True
|
||||
break
|
||||
|
||||
# add the tab if it is not already added
|
||||
if tab_here is False:
|
||||
self.app.ui.plot_tab_area.addTab(self.script_editor_tab, '%s' % _("Script Editor"))
|
||||
self.script_editor_tab.setObjectName(self.options['name'])
|
||||
self.script_editor_tab.setObjectName(self.options['name'] + "_editor_tab")
|
||||
self.app.ui.plot_tab_area.setCurrentWidget(self.script_editor_tab)
|
||||
|
||||
def change_level(self, level):
|
||||
|
||||
@@ -700,7 +700,8 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
|
||||
# some objects add a Tab on creation, close it here
|
||||
for idx in range(self.app.ui.plot_tab_area.count()):
|
||||
if self.app.ui.plot_tab_area.widget(idx).objectName() == active.obj.options['name']:
|
||||
widget_name = self.app.ui.plot_tab_area.widget(idx).objectName()
|
||||
if widget_name == active.obj.options['name'] or widget_name == (active.obj.options['name'] + "_editor_tab"):
|
||||
self.app.ui.plot_tab_area.removeTab(idx)
|
||||
break
|
||||
|
||||
@@ -753,7 +754,8 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
|
||||
# some objects add a Tab on creation, close it here
|
||||
for idx in range(self.app.ui.plot_tab_area.count()):
|
||||
if self.app.ui.plot_tab_area.widget(idx).objectName() == deleted.obj.options['name']:
|
||||
wdg_name = self.app.ui.plot_tab_area.widget(idx).objectName()
|
||||
if wdg_name == deleted.obj.options['name'] or wdg_name == (deleted.obj.options['name'] + "_editor_tab"):
|
||||
self.app.ui.plot_tab_area.removeTab(idx)
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user