Draft: small fix in point object

This commit is contained in:
Yorik van Havre 2014-02-13 12:19:59 -02:00
parent 37f283e7d7
commit 478772f067
2 changed files with 15 additions and 4 deletions

View File

@ -1101,7 +1101,17 @@ def move(objectslist,vector,copy=False):
if not isinstance(objectslist,list): objectslist = [objectslist]
newobjlist = []
for obj in objectslist:
if (obj.isDerivedFrom("Part::Feature")):
if getType(obj) == "Point":
v = Vector(obj.X,obj.Y,obj.Z)
v = v.add(vector)
if copy:
newobj = makeCopy(obj)
else:
newobj = obj
newobj.X = v.x
newobj.Y = v.y
newobj.Z = v.z
elif (obj.isDerivedFrom("Part::Feature")):
if copy:
newobj = makeCopy(obj)
else:

View File

@ -1993,12 +1993,13 @@ class Move(Modifier):
if copy:
self.commit(translate("draft","Copy"),
['import Draft',
'Draft.move('+sel+','+DraftVecUtils.toString(delta)+',copy='+str(copy)+')'])
'Draft.move('+sel+','+DraftVecUtils.toString(delta)+',copy='+str(copy)+')',
'FreeCAD.ActiveDocument.recompute()'])
else:
self.commit(translate("draft","Move"),
['import Draft',
'Draft.move('+sel+','+DraftVecUtils.toString(delta)+',copy='+str(copy)+')'])
self.doc.recompute()
'Draft.move('+sel+','+DraftVecUtils.toString(delta)+',copy='+str(copy)+')',
'FreeCAD.ActiveDocument.recompute()'])
def action(self,arg):
"scene event handler"