minor fix

This commit is contained in:
sliptonic
2022-03-16 22:27:56 -05:00
parent 0d847fd482
commit be44c979d0

View File

@@ -265,11 +265,12 @@ class CommandPathInspect:
}
def IsActive(self):
if FreeCAD.ActiveDocument is not None:
for o in FreeCAD.ActiveDocument.Objects:
if o.Name[:3] == "Job":
return True
return False
return hasattr(FreeCADGui.Selection.getSelection()[0], "Path")
# if FreeCAD.ActiveDocument is not None:
# for o in FreeCAD.ActiveDocument.Objects:
# if o.Name[:3] == "Job":
# return True
# return False
def Activated(self):
# check that the selection contains exactly what we want