only reset the Op visibility when the active state is toggled

This commit is contained in:
Daniel Wood
2020-05-24 07:48:55 +01:00
parent 1803c4df0e
commit 40cdf68491
2 changed files with 4 additions and 4 deletions

View File

@@ -150,7 +150,10 @@ class _ToggleOperation:
def Activated(self):
for sel in FreeCADGui.Selection.getSelectionEx():
PathScripts.PathDressup.baseOp(sel.Object).Active = not(PathScripts.PathDressup.baseOp(sel.Object).Active)
op = PathScripts.PathDressup.baseOp(sel.Object)
op.Active = not op.Active
op.ViewObject.Visibility = op.Active
FreeCAD.ActiveDocument.recompute()

View File

@@ -472,9 +472,6 @@ class ObjectOp(object):
'''
PathLog.track()
if obj.ViewObject:
obj.ViewObject.Visibility = obj.Active
if not obj.Active:
path = Path.Path("(inactive operation)")
obj.Path = path