From b27b6d0c1b94bed8e9415c84c4ba33e2b067ced4 Mon Sep 17 00:00:00 2001 From: markus Date: Tue, 28 May 2019 18:40:02 -0700 Subject: [PATCH] Removed FreeCADGui dependency if Gui is not up --- src/Mod/Path/PathScripts/PathDressup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathDressup.py b/src/Mod/Path/PathScripts/PathDressup.py index fb9cdf09eb..b124918f84 100644 --- a/src/Mod/Path/PathScripts/PathDressup.py +++ b/src/Mod/Path/PathScripts/PathDressup.py @@ -23,12 +23,12 @@ # *************************************************************************** import FreeCAD -import FreeCADGui import PathScripts.PathJob as PathJob def selection(): '''isActive() ... return True if a dressup command is possible.''' - if FreeCAD.ActiveDocument: + if FreeCAD.ActiveDocument and FreeCAD.GuiUp: + import FreeCADGui sel = FreeCADGui.Selection.getSelectionEx() if len(sel) == 1 and sel[0].Object.isDerivedFrom("Path::Feature") and PathJob.Instances(): return sel[0].Object