Path: Allow parent job assignment

Modifications focus on allowing the creation of operations to include direct provision of parent job.
Path: Remove `useGui` implementation
This commit is contained in:
Russell Johnson
2021-08-12 22:26:57 -05:00
parent a5fcb3b225
commit 4c1951aedc
22 changed files with 53 additions and 49 deletions

View File

@@ -1280,12 +1280,12 @@ def Create(res):
this function directly, but calls the Activated() function of the Command object
that is created in each operations Gui implementation.'''
FreeCAD.ActiveDocument.openTransaction("Create %s" % res.name)
obj = res.objFactory(res.name)
obj = res.objFactory(res.name, obj=None, parentJob=res.job)
if obj.Proxy:
obj.ViewObject.Proxy = ViewProvider(obj.ViewObject, res)
obj.ViewObject.Visibility = False
FreeCAD.ActiveDocument.commitTransaction()
obj.ViewObject.Document.setEdit(obj.ViewObject, 0)
return obj
FreeCAD.ActiveDocument.abortTransaction()
@@ -1329,6 +1329,7 @@ class CommandResources:
self.menuText = menuText
self.accelKey = accelKey
self.toolTip = toolTip
self.job = None
def SetupOperation(name,