Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-02-07 02:09:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-07 02:09:56 +0300
commita5869c367e660b52f0b90f89b2405944db434156 (patch)
treebad9750b4972d80ce3854735a8c2749d869585b9 /source/blender/editors/undo
parent9df460203517a791107c6da816ab21ace803d5f4 (diff)
Cleanup: remove unnecessary undo function
Diffstat (limited to 'source/blender/editors/undo')
-rw-r--r--source/blender/editors/undo/ed_undo.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c
index f00e081261c..69e02148ba5 100644
--- a/source/blender/editors/undo/ed_undo.c
+++ b/source/blender/editors/undo/ed_undo.c
@@ -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 */