Added preference to choose between legacy tools and new tool bits.

This commit is contained in:
Markus Lampert
2019-11-09 17:09:30 -08:00
parent 0a84f3168e
commit a2935d5ff0
6 changed files with 105 additions and 23 deletions

View File

@@ -29,6 +29,8 @@ import FreeCADGui
import Path
import PathScripts
import PathScripts.PathLog as PathLog
import PathScripts.PathPreferences as PathPreferences
import PathScripts.PathToolBitLibraryCmd as PathToolBitLibraryCmd
import PathScripts.PathToolEdit as PathToolEdit
import PathScripts.PathUtils as PathUtils
import PathScripts.PathToolLibraryManager as ToolLibraryManager
@@ -439,12 +441,14 @@ class CommandToolLibraryEdit():
pass
def edit(self, job=None, cb=None):
editor = EditorPanel(job, cb)
editor.setupUi()
r = editor.form.exec_()
if r:
pass
if PathPreferences.toolsUseLegacyTools():
editor = EditorPanel(job, cb)
editor.setupUi()
editor.form.exec_()
else:
if PathToolBitLibraryCmd.CommandToolBitLibraryLoad.Execute(job):
if cb:
cb()
def GetResources(self):
return {'Pixmap' : 'Path-ToolTable',
@@ -456,7 +460,6 @@ class CommandToolLibraryEdit():
return not FreeCAD.ActiveDocument is None
def Activated(self):
self.edit()
if FreeCAD.GuiUp: