Draft: Solved duplication problem - Fixed #2304

This commit is contained in:
Yorik van Havre
2018-12-05 11:05:40 -02:00
parent 69328ae2f5
commit 7159d38e82

View File

@@ -4973,8 +4973,11 @@ class Draft_Clone(Modifier):
l = len(FreeCADGui.Selection.getSelection())
FreeCADGui.addModule("Draft")
FreeCAD.ActiveDocument.openTransaction("Clone")
nonRepeatList = []
for obj in FreeCADGui.Selection.getSelection():
FreeCADGui.doCommand("Draft.clone(FreeCAD.ActiveDocument."+obj.Name+")")
if obj not in nonRepeatList:
FreeCADGui.doCommand("Draft.clone(FreeCAD.ActiveDocument."+obj.Name+")")
nonRepeatList.append(obj)
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()
FreeCADGui.Selection.clearSelection()