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>2011-12-13 01:01:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-13 01:01:39 +0400
commit8115753fd280c4e23f9d86508184ed057a9a2099 (patch)
treea68a1b0d219f3521a41a23ed1f358a530b388978 /source/blender/editors/util
parent80da50270dfd4c330302813aa3a92240a9361865 (diff)
parent01478a3743f1d1fe3d641ff498953af027ca2e60 (diff)
svn merge ^/trunk/blender -r42564:42586
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/undo.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 996fab59762..be596a9a4a9 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -141,8 +141,8 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
ScrArea *sa= CTX_wm_area(C);
/* undo during jobs are running can easily lead to freeing data using by jobs,
- or they can just lead to freezing job in some other cases */
- if(WM_jobs_has_running(CTX_wm_manager(C))) {
+ * or they can just lead to freezing job in some other cases */
+ if (WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C))) {
return OPERATOR_CANCELLED;
}
@@ -356,13 +356,24 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op)
int ret= 0;
if(op) {
+ wmWindowManager *wm= CTX_wm_manager(C);
+ struct Scene *scene= CTX_data_scene(C);
+
ARegion *ar= CTX_wm_region(C);
ARegion *ar1= BKE_area_find_region_type(CTX_wm_area(C), RGN_TYPE_WINDOW);
if(ar1)
CTX_wm_region_set(C, ar1);
- if(WM_operator_repeat_check(C, op) && WM_operator_poll(C, op->type)) {
+ if ( (WM_operator_repeat_check(C, op)) &&
+ (WM_operator_poll(C, op->type)) &&
+ /* note, undo/redo cant run if there are jobs active,
+ * check for screen jobs only so jobs like material/texture/world preview
+ * (which copy their data), wont stop redo, see [#29579]],
+ *
+ * note, - WM_operator_check_ui_enabled() jobs test _must_ stay in sync with this */
+ (WM_jobs_test(wm, scene) == 0))
+ {
int retval;
if (G.f & G_DEBUG)