From 93e01c16b67e48c4954568033940a4b2732c99f0 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Fri, 5 Sep 2014 17:48:30 -0300 Subject: [PATCH] Draft: Fixed copying of Draft points --- src/Mod/Draft/Draft.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 31d23bc1b..487aa9e62 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -912,6 +912,11 @@ def makeCopy(obj,force=None,reparent=False): _Rectangle(newobj) if gui: _ViewProviderRectangle(newobj.ViewObject) + elif (getType(obj) == "Point") or (force == "Point"): + newobj = FreeCAD.ActiveDocument.addObject(obj.TypeId,getRealName(obj.Name)) + _Point(newobj) + if gui: + _ViewProviderPoint(newobj.ViewObject) elif (getType(obj) == "Dimension") or (force == "Dimension"): newobj = FreeCAD.ActiveDocument.addObject(obj.TypeId,getRealName(obj.Name)) _Dimension(newobj) @@ -4766,7 +4771,7 @@ class _PathArray(_DraftObject): class _Point(_DraftObject): "The Draft Point object" - def __init__(self, obj,x,y,z): + def __init__(self, obj,x=0,y=0,z=0): _DraftObject.__init__(self,obj,"Point") obj.addProperty("App::PropertyFloat","X","Draft","Location").X = x obj.addProperty("App::PropertyFloat","Y","Draft","Location").Y = y