diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-03 15:19:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-03 15:19:51 +0300 |
commit | a2c0a382cd00b9b1a3058ad0017887e451b73465 (patch) | |
tree | be978c24be659a22afb22eb53c52c468e4087c06 /source/blender/editors/sculpt_paint/paint_image_undo.c | |
parent | feb7852e1ba55b4c7f697ec52fee672a8cc2261c (diff) | |
parent | b3004d30f5d5060035c5f8ac4cb6338463872877 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_undo.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_undo.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_undo.c b/source/blender/editors/sculpt_paint/paint_image_undo.c index 5308ef0fae8..5184f5cc757 100644 --- a/source/blender/editors/sculpt_paint/paint_image_undo.c +++ b/source/blender/editors/sculpt_paint/paint_image_undo.c @@ -41,12 +41,12 @@ #include "BKE_context.h" #include "BKE_image.h" #include "BKE_main.h" -#include "BKE_global.h" #include "BKE_undo_system.h" #include "DEG_depsgraph.h" #include "ED_paint.h" +#include "ED_undo.h" #include "GPU_draw.h" @@ -360,15 +360,15 @@ static void image_undo_free_list(ListBase *lb) void ED_image_undo_push_begin(const char *name) { + UndoStack *ustack = ED_undo_stack_get(); bContext *C = NULL; /* special case, we never read from this. */ - wmWindowManager *wm = G.main->wm.first; - BKE_undosys_step_push_init_with_type(wm->undo_stack, C, name, BKE_UNDOSYS_TYPE_IMAGE); + BKE_undosys_step_push_init_with_type(ustack, C, name, BKE_UNDOSYS_TYPE_IMAGE); } void ED_image_undo_push_end(void) { - wmWindowManager *wm = G.main->wm.first; /* XXX, avoids adding extra arg. */ - BKE_undosys_step_push(wm->undo_stack, NULL, NULL); + UndoStack *ustack = ED_undo_stack_get(); + BKE_undosys_step_push(ustack, NULL, NULL); } static void image_undo_invalidate(void) @@ -489,8 +489,8 @@ ListBase *ED_image_undosys_step_get_tiles(UndoStep *us_p) ListBase *ED_image_undo_get_tiles(void) { - wmWindowManager *wm = G.main->wm.first; /* XXX, avoids adding extra arg. */ - UndoStep *us = BKE_undosys_stack_init_or_active_with_type(wm->undo_stack, BKE_UNDOSYS_TYPE_IMAGE); + UndoStack *ustack = ED_undo_stack_get(); + UndoStep *us = BKE_undosys_stack_init_or_active_with_type(ustack, BKE_UNDOSYS_TYPE_IMAGE); return ED_image_undosys_step_get_tiles(us); } |