Cleanup: remove unnecessary undo function
This commit is contained in:
parent
9df4602035
commit
a5869c367e
Notes:
blender-bot
2023-02-14 11:34:30 +01:00
Referenced by issue #61370, Material turns bright white when boolean mesh is not UV-unwrapped Referenced by issue #61290, Poor denoising results with volumes and branched path tracing (with multiple volume samples and bounces). Referenced by issue #61275, certain SVG type fails to import
|
@ -156,7 +156,6 @@ bool BKE_undosys_step_redo(UndoStack *ustack, struct bContext *C);
|
|||
|
||||
bool BKE_undosys_step_load_data(UndoStack *ustack, struct bContext *C, UndoStep *us);
|
||||
|
||||
bool BKE_undosys_step_undo_compat_only(UndoStack *ustack, struct bContext *C, int step);
|
||||
void BKE_undosys_step_undo_from_index(UndoStack *ustack, struct bContext *C, int index);
|
||||
UndoStep *BKE_undosys_step_same_type_next(UndoStep *us);
|
||||
UndoStep *BKE_undosys_step_same_type_prev(UndoStep *us);
|
||||
|
|
|
@ -767,18 +767,6 @@ bool BKE_undosys_step_load_data(UndoStack *ustack, bContext *C, UndoStep *us)
|
|||
return ok;
|
||||
}
|
||||
|
||||
bool BKE_undosys_step_undo_compat_only(UndoStack *ustack, bContext *C, int step)
|
||||
{
|
||||
if (step == 0) {
|
||||
return BKE_undosys_step_undo_with_data(ustack, C, ustack->step_active);
|
||||
}
|
||||
else if (step == 1) {
|
||||
return BKE_undosys_step_undo(ustack, C);
|
||||
}
|
||||
else {
|
||||
return BKE_undosys_step_redo(ustack, C);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Similar to #WM_operatortype_append
|
||||
*/
|
||||
|
|
|
@ -101,9 +101,13 @@ void ED_undo_push(bContext *C, const char *str)
|
|||
WM_file_tag_modified();
|
||||
}
|
||||
|
||||
/* note: also check undo_history_exec() in bottom if you change notifiers */
|
||||
/**
|
||||
* \note Also check #undo_history_exec in bottom if you change notifiers.
|
||||
*/
|
||||
static int ed_undo_step(bContext *C, int step, const char *undoname, ReportList *reports)
|
||||
{
|
||||
/* Mutually exclusives, ensure correct input. */
|
||||
BLI_assert((undoname && !step) || (!undoname && step));
|
||||
CLOG_INFO(&LOG, 1, "name='%s', step=%d", undoname, step);
|
||||
wmWindowManager *wm = CTX_wm_manager(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
|
@ -164,7 +168,12 @@ static int ed_undo_step(bContext *C, int step, const char *undoname, ReportList
|
|||
BKE_undosys_step_undo_with_data(wm->undo_stack, C, step_data_from_name);
|
||||
}
|
||||
else {
|
||||
BKE_undosys_step_undo_compat_only(wm->undo_stack, C, step);
|
||||
if (step == 1) {
|
||||
BKE_undosys_step_undo(wm->undo_stack, C);
|
||||
}
|
||||
else {
|
||||
BKE_undosys_step_redo(wm->undo_stack, C);
|
||||
}
|
||||
}
|
||||
|
||||
/* Set special modes for grease pencil */
|
||||
|
|
Loading…
Reference in New Issue