Draft: set the Autoconstraint view property only if the interface is up (FreeCAD.GuiUp)

This commit is contained in:
vocx-fc
2019-10-23 18:58:54 -05:00
committed by Yorik van Havre
parent 10cb6835a3
commit 28831b4c78

View File

@@ -2380,7 +2380,8 @@ def makeSketch(objectslist,autoconstraints=False,addTo=None,
else:
nobj = FreeCAD.ActiveDocument.addObject("Sketcher::SketchObject", name)
deletable = nobj
nobj.ViewObject.Autoconstraints = False
if FreeCAD.GuiUp:
nobj.ViewObject.Autoconstraints = False
# Collect constraints and add in one go to improve performance
constraints = []