Skip to content

Commit

Permalink
Draft: Leave all clones selected after cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed May 21, 2017
1 parent 94c68d7 commit ee58881
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Mod/Draft/Draft.py
Expand Up @@ -2956,6 +2956,7 @@ def mirror(objlist,p1,p2):

if len(result) == 1:
result = result[0]
select(result)
return result


Expand Down
6 changes: 5 additions & 1 deletion src/Mod/Draft/DraftTools.py
Expand Up @@ -4831,11 +4831,15 @@ def proceed(self):
if self.call:
self.view.removeEventCallback("SoEvent",self.call)
if FreeCADGui.Selection.getSelection():
l = len(FreeCADGui.Selection.getSelection())
FreeCAD.ActiveDocument.openTransaction("Clone")
for obj in FreeCADGui.Selection.getSelection():
Draft.clone(obj)
FreeCADGui.doCommand("Draft.clone(FreeCAD.ActiveDocument."+obj.Name+")")
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()
FreeCADGui.Selection.clearSelection()
for i in range(l):
FreeCADGui.Selection.addSelection(FreeCAD.ActiveDocument.Objects[-(1+i)])
self.finish()


Expand Down

0 comments on commit ee58881

Please sign in to comment.