fix 'add' button in Job task panel

fix chamfer bit
lgtm cleanup
This commit is contained in:
sliptonic
2020-11-19 17:10:50 -06:00
parent 2e552e88b2
commit 3a8f40a458
12 changed files with 51 additions and 52 deletions

View File

@@ -25,7 +25,6 @@ from collections import Counter
from contextlib import contextmanager
import math
import traceback
from pivy import coin
from PySide import QtCore, QtGui
@@ -45,6 +44,7 @@ import PathScripts.PathToolControllerGui as PathToolControllerGui
import PathScripts.PathToolLibraryEditor as PathToolLibraryEditor
import PathScripts.PathUtil as PathUtil
import PathScripts.PathUtils as PathUtils
import PathScripts.PathToolBitGui as PathToolBitGui
# lazily loaded modules
from lazy_loader.lazy_loader import LazyLoader
@@ -866,7 +866,15 @@ class TaskPanel:
self.toolControllerSelect()
def toolControllerAdd(self):
PathToolLibraryEditor.CommandToolLibraryEdit().edit(self.obj, self.updateToolController)
if PathPreferences.toolsUseLegacyTools():
PathToolLibraryEditor.CommandToolLibraryEdit().edit(self.obj, self.updateToolController)
else:
tools = PathToolBitGui.LoadTools()
for tool in tools:
tc = PathToolControllerGui.Create(name=tool.Label, tool=tool)
self.obj.Proxy.addToolController(tc)
FreeCAD.ActiveDocument.recompute()
self.updateToolController()
def toolControllerDelete(self):
self.objectDelete(self.form.toolControllerList)