forked from bartvdbraak/blender
bugfix [#24685] Changing mode bypasses undo suppression
Editmode undo operator was using the operator OPTYPE_UNDO flag as well as its own EM_DO_UNDO option. This gave 2 problems. - python suppressed undos would fail (as in the report). - Undo push was called twice on exiting editmode for no reason. Use the operator undo in this case.
This commit is contained in:
parent
5a37333053
commit
c8bcabaf40
@ -511,7 +511,7 @@ static int editmode_toggle_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
if(!CTX_data_edit_object(C))
|
||||
ED_object_enter_editmode(C, EM_WAITCURSOR);
|
||||
else
|
||||
ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
|
||||
ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* had EM_DO_UNDO but op flag calls undo too [#24685] */
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user