diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-30 12:34:54 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-30 12:34:54 +0300 |
commit | 5e98d8c523bba0146d18a404c810ba9ebbf3a535 (patch) | |
tree | 8c208a49bfbcd1902c860e22ef7e54a3c8f79c35 | |
parent | a7f2c3fca85823fbe2f0f708846fd9ad9ddfb2c9 (diff) |
Fix #20876: adjusting the settings after adding a new curve, surface,
or metaball creates duplicates, these did two undo pushes when only
one is needed.
-rw-r--r-- | source/blender/editors/object/object_add.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index dea8b13e9cc..ad7cc59d83e 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -379,7 +379,7 @@ static Object *effector_add_type(bContext *C, wmOperator *op, int type) BLI_addtail(curve_get_editcurve(ob), add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_PATH, 1)); if(!enter_editmode) - ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO); + ED_object_exit_editmode(C, EM_FREEDATA); } else { ob= ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer); @@ -517,7 +517,7 @@ static int object_add_curve_exec(bContext *C, wmOperator *op) /* userdef */ if (newob && !enter_editmode) { - ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO); + ED_object_exit_editmode(C, EM_FREEDATA); } WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit); @@ -603,7 +603,7 @@ static int object_add_surface_exec(bContext *C, wmOperator *op) /* userdef */ if (newob && !enter_editmode) { - ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO); + ED_object_exit_editmode(C, EM_FREEDATA); } WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit); @@ -668,7 +668,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op) /* userdef */ if (newob && !enter_editmode) { - ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO); + ED_object_exit_editmode(C, EM_FREEDATA); } WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit); @@ -783,9 +783,8 @@ static int object_armature_add_exec(bContext *C, wmOperator *op) add_primitive_bone(CTX_data_scene(C), v3d, rv3d); /* userdef */ - if (newob && !enter_editmode) { - ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO); - } + if (newob && !enter_editmode) + ED_object_exit_editmode(C, EM_FREEDATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit); |