Assign unique ToolNumber to newly created TC

This commit is contained in:
Markus Lampert
2019-11-28 17:31:36 -08:00
parent 7f4ad01bd2
commit 159a6350f3
@@ -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()