assembly: fix ViewProviderAssembly legacy checking

This commit is contained in:
Zheng, Lei 2020-02-05 17:50:47 +08:00
parent 472a090cea
commit 63ca9a4ef0

View File

@ -3960,11 +3960,6 @@ class ViewProviderAssembly(ViewProviderAsmGroup):
FreeCAD.closeActiveTransaction(True)
raise
def attach(self,vobj):
super(ViewProviderAssembly,self).attach(vobj)
if not hasProperty(vobj,'ShowParts'):
vobj.addProperty("App::PropertyBool","ShowParts"," Link")
def canAddToSceneGraph(self):
return True
@ -4102,7 +4097,10 @@ class ViewProviderAssembly(ViewProviderAsmGroup):
self.showParts()
def finishRestoring(self):
self.showParts()
if not hasProperty(self.ViewObject,'ShowParts'):
self.ViewObject.addProperty("App::PropertyBool","ShowParts"," Link")
else:
self.showParts()
@classmethod
def isBusy(cls):