Fix T85054: undo/redo app handlers broken

Regression in recent commit c13383da41
which swapped undo/redo when calling the handlers.

Ref D10200
This commit is contained in:
Falk David 2021-01-26 09:15:09 +11:00 committed by Campbell Barton
parent eaa726542e
commit 6249995c5e
Notes: blender-bot 2023-02-14 08:49:53 +01:00
Referenced by issue #85054, UNDO/REDO system is broken(Python handlers are swapped)
1 changed files with 2 additions and 2 deletions

View File

@ -252,7 +252,7 @@ static int ed_undo_step_impl(bContext *C,
Main *bmain = CTX_data_main(C);
wm->op_undo_depth++;
BKE_callback_exec_id(
bmain, &scene->id, (step_for_callback > 0) ? BKE_CB_EVT_UNDO_PRE : BKE_CB_EVT_REDO_PRE);
bmain, &scene->id, (step_for_callback == STEP_UNDO) ? BKE_CB_EVT_UNDO_PRE : BKE_CB_EVT_REDO_PRE);
wm->op_undo_depth--;
}
@ -301,7 +301,7 @@ static int ed_undo_step_impl(bContext *C,
scene = CTX_data_scene(C);
wm->op_undo_depth++;
BKE_callback_exec_id(
bmain, &scene->id, step_for_callback > 0 ? BKE_CB_EVT_UNDO_POST : BKE_CB_EVT_REDO_POST);
bmain, &scene->id, (step_for_callback == STEP_UNDO) ? BKE_CB_EVT_UNDO_POST : BKE_CB_EVT_REDO_POST);
wm->op_undo_depth--;
}