Use job.ToolTable.Group instead of job.ToolController.

This commit is contained in:
Markus Lampert
2020-12-28 17:13:10 -08:00
parent 8a95005586
commit 121152deb9
6 changed files with 9 additions and 9 deletions

View File

@@ -165,12 +165,12 @@ class CommandPathToolController(object):
tool = PathToolBitGui.ToolBitSelector().getTool()
if tool:
toolNr = None
for tc in job.ToolController:
for tc in job.ToolTable.Group:
if tc.Tool == tool:
toolNr = tc.ToolNumber
break
if not toolNr:
toolNr = max([tc.ToolNumber for tc in job.ToolController]) + 1
toolNr = max([tc.ToolNumber for tc in job.ToolTable.Group]) + 1
tc = Create("TC: {}".format(tool.Label), tool, toolNr)
job.Proxy.addToolController(tc)
FreeCAD.ActiveDocument.recompute()