Using the Arch window tool when a window is selected now produces

a clone
This commit is contained in:
Yorik van Havre
2012-03-24 11:41:45 -03:00
parent 9b6492f9d7
commit e102ab5eca
2 changed files with 11 additions and 1 deletions

View File

@@ -33,6 +33,10 @@ __url__ = "http://free-cad.sourceforge.net"
def makeWindow(baseobj=None,name="Window"):
'''makeWindow(obj,[name]): creates a window based on the
given object'''
if baseobj:
if Draft.getType(baseobj) == "Window":
obj = Draft.clone(baseobj)
return obj
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
_Window(obj)
_ViewProviderWindow(obj.ViewObject)