Assign unique ToolNumber to newly created TC

This commit is contained in:
Markus Lampert
2019-10-24 19:54:45 -07:00
parent 7f4ad01bd2
commit 159a6350f3

View File

@@ -156,7 +156,8 @@ class CommandPathToolController(object):
if job:
tool = PathToolBitGui.ToolBitSelector().getTool()
if tool:
tc = Create("TC: {}".format(tool.Label), tool)
toolNr = max([tc.ToolNumber for tc in job.ToolController]) + 1
tc = Create("TC: {}".format(tool.Label), tool, toolNr)
job.Proxy.addToolController(tc)
FreeCAD.ActiveDocument.recompute()