Fix regression introduced in recent jobs system refactoring
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 3 Sep 2012 16:05:37 +0000 (16:05 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 3 Sep 2012 16:05:37 +0000 (16:05 +0000)
Fluid simulation job progress wasn't displayed anymore.

source/blender/editors/interface/interface_templates.c

index 71c019a..2241822 100644 (file)
@@ -2557,6 +2557,7 @@ void uiTemplateOperatorSearch(uiLayout *layout)
 #define B_STOPCOMPO     4
 #define B_STOPSEQ       5
 #define B_STOPCLIP      6
+#define B_STOPOTHER     7
 
 static void do_running_jobs(bContext *C, void *UNUSED(arg), int event)
 {
@@ -2579,6 +2580,9 @@ static void do_running_jobs(bContext *C, void *UNUSED(arg), int event)
                case B_STOPCLIP:
                        WM_jobs_stop(CTX_wm_manager(C), CTX_wm_area(C), NULL);
                        break;
+               case B_STOPOTHER:
+                       G.is_break = TRUE;
+                       break;
        }
 }
 
@@ -2618,6 +2622,10 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
                                handle_event = B_STOPCOMPO;
                                break;
                        }
+                       else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_ANY)) {
+                               handle_event = B_STOPOTHER;
+                               break;
+                       }
                }
                owner = scene;
        }