Reproducing :
Enable 'Enter Edit Mode' in user prefs, add torus (now Blender is in edit mode), change view and enable 'Align to View' - Blender creates new torus aligned to view but doesn't delete previous, not aligned. It only happens immediately after switching to edit mode, when 'Align..' button is pressed for first time.
Also there is no aligning to World after switch off 'Align to view' like in other primitives. Can't use Rotation sliders unless manually disable 'Align to view' - I think it could be done automatically.
Other primitives do not allow using 'Align to view' after adjusting with rotation sliders.
Blender r34298, Ubuntu 10.04 32bit.
Description
Related Objects
Event Timeline
This is a bug in blenders operator api caused by a fix I did which was reported previously.
calling:
bpy.ops.mesh.select_all(action='DESELECT')
adds an item to the undo stack when it should not, possibly because this is an editmesh undo, rather then global undo.
Ill look into why this gives an undo push.
I was wrong about bpy.ops.mesh.select_all(action='DESELECT'),
This is caused by pythons add-object entering editmode with the mesh already created as opposed to entering editmode and then creating the mesh as our C code does. I cant see a simple fix for this without having some editmode hack to start the undo state on a blank mesh even when it enters with a valid mesh.
...or by having some python function to insert a mesh into an existing editmesh.