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:
Diffstat (limited to 'source/blender/editors/util/undo.c')
-rw-r--r--source/blender/editors/util/undo.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 7f2e5b4b81c..52f87c19dc8 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -59,6 +59,7 @@
#include "ED_mball.h"
#include "ED_mesh.h"
#include "ED_object.h"
+#include "ED_render.h"
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "ED_util.h"
@@ -140,9 +141,12 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
SpaceImage *sima = (SpaceImage *)sa->spacedata.first;
if ((obact && (obact->mode & OB_MODE_TEXTURE_PAINT)) || (sima->mode == SI_MODE_PAINT)) {
- if (!ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step, undoname) && undoname)
- if (U.uiflag & USER_GLOBALUNDO)
+ if (!ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step, undoname) && undoname) {
+ if (U.uiflag & USER_GLOBALUNDO) {
+ ED_viewport_render_kill_jobs(C);
BKE_undo_name(C, undoname);
+ }
+ }
WM_event_add_notifier(C, NC_WINDOW, NULL);
return OPERATOR_FINISHED;
@@ -192,6 +196,8 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
/* for example, texface stores image pointers */
undo_editmode_clear();
+ ED_viewport_render_kill_jobs(C);
+
if (undoname)
BKE_undo_name(C, undoname);
else
@@ -363,6 +369,8 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op)
{
int retval;
+ ED_viewport_render_kill_jobs(C);
+
if (G.debug & G_DEBUG)
printf("redo_cb: operator redo %s\n", op->type->name);
ED_undo_pop_op(C, op);
@@ -529,6 +537,7 @@ static int undo_history_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_GEOM | ND_DATA, NULL);
}
else {
+ ED_viewport_render_kill_jobs(C);
BKE_undo_number(C, item);
WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, CTX_data_scene(C));
}