Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code

This commit is contained in:
wmayer 2014-02-13 17:04:14 +01:00
commit 65d001f3d4
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"