Part: Auto-add primitives to active Part
Modified DlgPrimitives.cpp to allow auto adding the newly created object to active Std_Part. Works with: box, cylinder, sphere, cone, torus, tube, primitives.
This commit is contained in:
@@ -53,6 +53,9 @@ class CommandTube:
|
||||
tube = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Tube")
|
||||
Shapes.TubeFeature(tube)
|
||||
vp = ViewProviderShapes.ViewProviderTube(tube.ViewObject)
|
||||
activePart = FreeCADGui.activeView().getActiveObject('part')
|
||||
if activePart:
|
||||
activePart.addObject(tube)
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
vp.startDefaultEditMode(tube.ViewObject)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user