diff --git a/src/Mod/Path/PathScripts/PathToolBitLibraryCmd.py b/src/Mod/Path/PathScripts/PathToolBitLibraryCmd.py index f47bedf520..5d03f72fe0 100644 --- a/src/Mod/Path/PathScripts/PathToolBitLibraryCmd.py +++ b/src/Mod/Path/PathScripts/PathToolBitLibraryCmd.py @@ -70,53 +70,9 @@ class CommandToolBitLibraryOpen: def Activated(self): import PathScripts.PathToolBitLibraryGui as PathToolBitLibraryGui library = PathToolBitLibraryGui.ToolBitLibrary() + library.open() -# class CommandToolBitLibraryLoad: -# ''' -# Command used to load an entire ToolBitLibrary (or part of it) from a file into a job. -# ''' - -# def __init__(self): -# pass - -# def GetResources(self): -# return {'Pixmap': 'Path_ToolTable', -# 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathToolBitLibrary", "Load ToolBit Library"), -# 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathToolBitLibrary", "Load an entire ToolBit library or part of it into a job")} - -# def selectedJob(self): -# if FreeCAD.ActiveDocument: -# sel = FreeCADGui.Selection.getSelectionEx() -# if sel and sel[0].Object.Name[:3] == 'Job': -# return sel[0].Object -# jobs = [o for o in FreeCAD.ActiveDocument.Objects if o.Name[:3] == 'Job'] -# if 1 == len(jobs): -# return jobs[0] -# return None - -# def IsActive(self): -# return not self.selectedJob() is None - -# def Activated(self): -# job = self.selectedJob() -# self.Execute(job) - -# @classmethod -# def Execute(cls, job): -# import PathScripts.PathToolBitLibraryGui as PathToolBitLibraryGui -# import PathScripts.PathToolControllerGui as PathToolControllerGui - -# library = PathToolBitLibraryGui.ToolBitLibrary() - -# if 1 == library.open() and job: -# for nr, tool in library.selectedOrAllTools(): -# tc = PathToolControllerGui.Create("TC: {}".format(tool.Label), tool, nr) -# job.Proxy.addToolController(tc) -# FreeCAD.ActiveDocument.recompute() -# return True -# return False - if FreeCAD.GuiUp: FreeCADGui.addCommand('Path_ToolBitLibraryOpen', CommandToolBitLibraryOpen())