Arch/Draft: Autoselect results of Up/downgrade and arch component
This commit is contained in:
@@ -211,6 +211,7 @@ def makeComponent(baseobj=None,name="Component",delete=False):
|
||||
baseobj.ViewObject.hide()
|
||||
elif isinstance(baseobj,Part.Shape):
|
||||
obj.Shape = baseobj
|
||||
Draft.select(obj)
|
||||
return obj
|
||||
|
||||
def cloneComponent(obj):
|
||||
@@ -225,6 +226,8 @@ def cloneComponent(obj):
|
||||
if hasattr(obj,"IfcAttributes"):
|
||||
if obj.IfcAttributes:
|
||||
c.IfcAttributes = obj.IfcAttributes
|
||||
Draft.select(c)
|
||||
return c
|
||||
|
||||
def setAsSubcomponent(obj):
|
||||
'''Sets the given object properly to become a subcomponent (addition, subtraction)
|
||||
|
||||
@@ -2869,6 +2869,7 @@ def clone(obj,delta=None,forcedraft=False):
|
||||
cl.Tag = base.Tag
|
||||
except:
|
||||
pass
|
||||
select(cl)
|
||||
return cl
|
||||
else:
|
||||
cl = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Clone")
|
||||
@@ -2883,6 +2884,7 @@ def clone(obj,delta=None,forcedraft=False):
|
||||
elif len(obj) == 1:
|
||||
cl.Placement = obj[0].Placement
|
||||
formatObject(cl,obj[0])
|
||||
select(cl)
|
||||
return cl
|
||||
|
||||
def getCloneBase(obj,strict=False):
|
||||
@@ -3375,6 +3377,7 @@ def upgrade(objects,delete=False,force=None):
|
||||
deleteList = []
|
||||
for n in names:
|
||||
FreeCAD.ActiveDocument.removeObject(n)
|
||||
select(addList)
|
||||
return [addList,deleteList]
|
||||
|
||||
def downgrade(objects,delete=False,force=None):
|
||||
@@ -3575,6 +3578,7 @@ def downgrade(objects,delete=False,force=None):
|
||||
deleteList = []
|
||||
for n in names:
|
||||
FreeCAD.ActiveDocument.removeObject(n)
|
||||
select(addList)
|
||||
return [addList,deleteList]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user