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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user