Draft: Fix clone of art object
This commit is contained in:
parent
16787bf1a1
commit
9bb3193395
|
@ -2712,7 +2712,8 @@ def clone(obj,delta=None):
|
|||
pass
|
||||
return cl
|
||||
else:
|
||||
cl = FreeCAD.ActiveDocument.addObject("Part::AttachableObjectPython","Clone")
|
||||
cl = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Clone")
|
||||
cl.addExtension("Part::AttachExtensionPython", None)
|
||||
cl.Label = prefix + obj[0].Label
|
||||
_Clone(cl)
|
||||
if gui:
|
||||
|
|
|
@ -132,6 +132,12 @@ class DraftTest(unittest.TestCase):
|
|||
r2 = Draft.offset(r,FreeCAD.Vector(-1,-1,0),copy=True)
|
||||
self.failUnless(r2,"Draft Offset failed")
|
||||
|
||||
def testCloneOfPart(self):
|
||||
#test for a bug introduced by changes attachment code
|
||||
box = FreeCAD.ActiveDocument.addObject("Part::Box", "Box")
|
||||
clone = Draft.clone(box)
|
||||
self.failUnless(clone.hasExtension("Part::AttachExtension"))
|
||||
|
||||
# modification tools
|
||||
|
||||
def tearDown(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user