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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user