Also restore position of base op when dressup is deleted.

This commit is contained in:
Markus Lampert
2018-11-03 15:55:39 -07:00
committed by Yorik van Havre
parent fe916e3b58
commit a4fb7b6c95
6 changed files with 7 additions and 6 deletions

View File

@@ -167,7 +167,7 @@ class ViewProviderDressup:
'''this makes sure that the base operation is added back to the project and visible'''
FreeCADGui.ActiveDocument.getObject(arg1.Object.Base.Name).Visibility = True
job = PathUtils.findParentJob(arg1.Object)
job.Proxy.addOperation(arg1.Object.Base)
job.Proxy.addOperation(arg1.Object.Base, arg1.Object)
arg1.Object.Base = None
return True

View File

@@ -1020,7 +1020,7 @@ class ViewProviderDressup:
'''this makes sure that the base operation is added back to the project and visible'''
FreeCADGui.ActiveDocument.getObject(arg1.Object.Base.Name).Visibility = True
job = PathUtils.findParentJob(arg1.Object)
job.Proxy.addOperation(arg1.Object.Base)
job.Proxy.addOperation(arg1.Object.Base, arg1.Object)
arg1.Object.Base = None
return True

View File

@@ -457,7 +457,8 @@ class ViewProviderDressup:
def onDelete(self, arg1=None, arg2=None):
FreeCADGui.ActiveDocument.getObject(arg1.Object.Base.Name).Visibility = True
PathUtils.addToJob(arg1.Object.Base)
job = PathUtils.findParentJob(arg1.Object.Base)
job.Proxy.addOperation(arg1.Object.Base, arg1.Object)
arg1.Object.Base = None
return True

View File

@@ -320,7 +320,7 @@ class ViewProviderDressup:
'''this makes sure that the base operation is added back to the project and visible'''
FreeCADGui.ActiveDocument.getObject(arg1.Object.Base.Name).Visibility = True
job = PathUtils.findParentJob(self.obj)
job.Proxy.addOperation(arg1.Object.Base)
job.Proxy.addOperation(arg1.Object.Base, arg1.Object)
arg1.Object.Base = None
return True

View File

@@ -642,7 +642,7 @@ class ViewProviderDressup:
'''this makes sure that the base operation is added back to the project and visible'''
FreeCADGui.ActiveDocument.getObject(arg1.Object.Base.Name).Visibility = True
job = PathUtils.findParentJob(self.obj)
job.Proxy.addOperation(arg1.Object.Base)
job.Proxy.addOperation(arg1.Object.Base, arg1.Object)
arg1.Object.Base = None
return True

View File

@@ -394,7 +394,7 @@ class PathDressupTagViewProvider:
if self.obj.Base.ViewObject:
self.obj.Base.ViewObject.Visibility = True
job = PathUtils.findParentJob(self.obj)
job.Proxy.addOperation(arg1.Object.Base)
job.Proxy.addOperation(arg1.Object.Base, arg1.Object)
arg1.Object.Base = None
# if self.debugDisplay():
# self.vobj.Debug.removeObjectsFromDocument()