gui: reset visiblity on activate auto element visibility
This commit is contained in:
parent
f9ed2eb880
commit
f1e6ce4425
2
gui.py
2
gui.py
|
@ -340,11 +340,13 @@ 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 if checked else 0
|
||||
obj.setPropertyStatus('VisibilityList',
|
||||
'NoModify' if checked else '-NoModify')
|
||||
elif isTypeOf(obj,(AsmElementLink,AsmElement)):
|
||||
obj.Visibility = False
|
||||
vis = visible and not isTypeOf(obj,AsmElement)
|
||||
obj.Proxy.parent.Object.setElementVisible(obj.Name,vis)
|
||||
obj.ViewObject.OnTopWhenSelected = 2
|
||||
|
|
Loading…
Reference in New Issue
Block a user