From be44c979d091bd953a4b796ac400e49853dbcb8d Mon Sep 17 00:00:00 2001 From: sliptonic Date: Wed, 16 Mar 2022 22:27:56 -0500 Subject: [PATCH] minor fix --- src/Mod/Path/PathScripts/PathInspect.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathInspect.py b/src/Mod/Path/PathScripts/PathInspect.py index 786bcd2c4c..38692c9397 100644 --- a/src/Mod/Path/PathScripts/PathInspect.py +++ b/src/Mod/Path/PathScripts/PathInspect.py @@ -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