Fixed up onDelete for dogbone and ramp entry as well.

This commit is contained in:
Markus Lampert
2017-07-26 13:20:25 -07:00
committed by wmayer
parent 606c6e9e0e
commit 5ae7ebd12c
2 changed files with 4 additions and 2 deletions

View File

@@ -982,7 +982,8 @@ class ViewProviderDressup:
def onDelete(self, arg1=None, arg2=None):
'''this makes sure that the base operation is added back to the project and visible'''
FreeCADGui.ActiveDocument.getObject(arg1.Object.Base.Name).Visibility = True
PathUtils.addToJob(arg1.Object.Base)
job = PathUtils.findParentJob(arg1.Object)
PathUtils.addObjectToJob(arg1.Object.Base, job)
arg1.Object.Base = None
return True

View File

@@ -563,7 +563,8 @@ class ViewProviderDressup:
PathLog.debug("Deleting Dressup")
'''this makes sure that the base operation is added back to the project and visible'''
FreeCADGui.ActiveDocument.getObject(arg1.Object.Base.Name).Visibility = True
PathUtils.addToJob(arg1.Object.Base)
job = PathUtils.findParentJob(self.obj)
PathUtils.addObjectToJob(arg1.Object.Base, job)
arg1.Object.Base = None
return True