Using the Arch window tool when a window is selected now produces
a clone
This commit is contained in:
parent
9b6492f9d7
commit
e102ab5eca
|
@ -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)
|
||||
|
|
|
@ -1581,8 +1581,11 @@ def clone(obj,delta=None):
|
|||
if not isinstance(obj,list):
|
||||
obj = [obj]
|
||||
cl = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Clone")
|
||||
cl.Label = "Clone of " + obj[0].Label
|
||||
_Clone(cl)
|
||||
_ViewProviderDraftPart(cl.ViewObject)
|
||||
if gui:
|
||||
_ViewProviderDraftPart(cl.ViewObject)
|
||||
formatObject(cl,obj[0])
|
||||
cl.Objects = obj
|
||||
if delta:
|
||||
cl.Placement.move(delta)
|
||||
|
@ -2813,3 +2816,6 @@ class _ViewProviderDraftPart(_ViewProviderDraft):
|
|||
def getIcon(self):
|
||||
return ":/icons/Tree_Part.svg"
|
||||
|
||||
def claimChildren(self):
|
||||
return []
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user