Path: Added pref setting to disable auto-include of new paths in projects

This commit is contained in:
Yorik van Havre
2016-01-24 21:04:02 -02:00
parent a691fec1dd
commit cbdd18cef6
9 changed files with 26 additions and 74 deletions

View File

@@ -95,8 +95,10 @@ class CommandFromShape:
return
FreeCAD.ActiveDocument.openTransaction(translate("Path_FromShape","Create path from shape"))
FreeCADGui.addModule("PathScripts.PathUtils")
FreeCADGui.doCommand("obj = FreeCAD.activeDocument().addObject('Path::FeatureShape','PathShape')")
FreeCADGui.doCommand("obj.Shape = FreeCAD.activeDocument()."+selection[0].Name+".Shape")
FreeCADGui.doCommand('PathScripts.PathUtils.addToProject(obj)')
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()