Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code
This commit is contained in:
commit
65d001f3d4
|
@ -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:
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user