Draft: Leave all clones selected after cloning
This commit is contained in:
@@ -2956,6 +2956,7 @@ def mirror(objlist,p1,p2):
|
||||
|
||||
if len(result) == 1:
|
||||
result = result[0]
|
||||
select(result)
|
||||
return result
|
||||
|
||||
|
||||
|
||||
@@ -4831,11 +4831,15 @@ class Draft_Clone(Modifier):
|
||||
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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user