Added support for dressups to toggle Active state command.

This commit is contained in:
Markus Lampert
2019-12-15 17:52:05 -08:00
parent 3d5d10c4ea
commit 5df4bbf2f4

View File

@@ -136,13 +136,13 @@ class _ToggleOperation:
return False
try:
obj = FreeCADGui.Selection.getSelectionEx()[0].Object
return isinstance(obj.Proxy, PathScripts.PathOp.ObjectOp)
return isinstance(PathScripts.PathDressup.baseOp(obj).Proxy, PathScripts.PathOp.ObjectOp)
except(IndexError, AttributeError):
return False
def Activated(self):
obj = FreeCADGui.Selection.getSelectionEx()[0].Object
obj.Active = not(obj.Active)
PathScripts.PathDressup.baseOp(obj).Active = not(PathScripts.PathDressup.baseOp(obj).Active)
FreeCAD.ActiveDocument.recompute()