diff options
author | Ton Roosendaal <ton@blender.org> | 2004-11-23 01:41:07 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-11-23 01:41:07 +0300 |
commit | f3c8c47adb6ff3e3ca88418f4c26e9795029613f (patch) | |
tree | 9cea62673a5568f6b8add5ef978ca1c0da1c8127 /source/blender/src/editobject.c | |
parent | 0d9fa743489bd9bf9b1c33541dc7506136e030d0 (diff) |
Fix for #1839
On large changes of the Lattice resolution button, the undopush crashed.
Reason was that the push happened for buttons before the actual event for
buttons was executed.
Solved by creating new event UNDOPUSH that's being added to the queue by
by buttons now.
- Made button undo texts for number buttons more clear
- Added undo push for missing Add lamp/empty/lattice/camera
Diffstat (limited to 'source/blender/src/editobject.c')
-rw-r--r-- | source/blender/src/editobject.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index c23a31b7eb3..aff43653fb2 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -187,7 +187,7 @@ float centre[3], centroid[3]; void mirrormenu(void); -void add_object_draw(int type) /* for toolbox */ +void add_object_draw(int type) /* for toolbox or menus, only non-editmode stuff */ { Object *ob; @@ -198,7 +198,12 @@ void add_object_draw(int type) /* for toolbox */ if (G.obedit) exit_editmode(2); // freedata, and undo ob= add_object(type); base_init_from_view3d(BASACT, G.vd); - + + if(type==OB_EMPTY) BIF_undo_push("Add Empty"); + else if(type==OB_LAMP) BIF_undo_push("Add Lamp"); + else if(type==OB_LATTICE) BIF_undo_push("Add Lattice"); + else BIF_undo_push("Add Camera"); + allqueue(REDRAWVIEW3D, 0); } |