gui: remove unnecessary Visibility change in AsmCmdAutoElementVis

This commit is contained in:
Zheng, Lei 2019-01-18 12:05:27 +08:00
parent 5e44537be4
commit e15a96bf81
2 changed files with 2 additions and 2 deletions

View File

@ -2274,6 +2274,8 @@ class AsmElementGroup(AsmGroup):
for o in obj.Group:
getProxy(o,AsmElement).parent = self
obj.cacheChildLabel()
# 'PartialTrigger' is just for silencing warning when partial load
self.Object.setPropertyStatus('VisibilityList', 'PartialTrigger')
if gui.AsmCmdManager.AutoElementVis:
obj.setPropertyStatus('VisibilityList','NoModify')

2
gui.py
View File

@ -550,7 +550,6 @@ class AsmCmdAutoElementVis(AsmCmdCheckable):
for doc in FreeCAD.listDocuments().values():
for obj in doc.Objects:
if isTypeOf(obj,(AsmConstraint,AsmElementGroup)):
obj.Visibility = False
if isTypeOf(obj,AsmConstraint):
obj.ViewObject.OnTopWhenSelected = 2
obj.setPropertyStatus('VisibilityList',
@ -559,7 +558,6 @@ class AsmCmdAutoElementVis(AsmCmdCheckable):
if checked:
obj.Proxy.parent.Object.setElementVisible(
obj.Name,False)
obj.Visibility = False
obj.ViewObject.OnTopWhenSelected = 2