diff --git a/src/Mod/CAM/Path/Main/Gui/Inspect.py b/src/Mod/CAM/Path/Main/Gui/Inspect.py index 569f3ca387..097a81e221 100644 --- a/src/Mod/CAM/Path/Main/Gui/Inspect.py +++ b/src/Mod/CAM/Path/Main/Gui/Inspect.py @@ -263,7 +263,7 @@ class CommandPathInspect: selection = FreeCADGui.Selection.getSelection() if len(selection) == 0: return False - obj = selection[0].Object + obj = selection[0] return hasattr(obj, "Path") and len(obj.Path.Commands) > 0 def Activated(self): diff --git a/src/Mod/CAM/Path/Main/Gui/SanityCmd.py b/src/Mod/CAM/Path/Main/Gui/SanityCmd.py index 86d3d04e8f..32b8f298fe 100644 --- a/src/Mod/CAM/Path/Main/Gui/SanityCmd.py +++ b/src/Mod/CAM/Path/Main/Gui/SanityCmd.py @@ -56,7 +56,7 @@ class CommandCAMSanity: } def IsActive(self): - selection = FreeCADGui.Selection.getSelection() + selection = FreeCADGui.Selection.getSelectionEx() if len(selection) == 0: return False obj = selection[0].Object