2.5
authorTon Roosendaal <ton@blender.org>
Tue, 6 Jan 2009 10:30:34 +0000 (10:30 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 6 Jan 2009 10:30:34 +0000 (10:30 +0000)
Bugfix: the area level Refresh callback was not getting Context set,
it was NULLed still. This fix allows bone selecting and seeing updates
in the action editor. Not other way around though, will investigate.

source/blender/windowmanager/intern/wm_event_system.c

index 843137cbec1ccac13f9998f9f56a4bc28d626190..eb5a1449f3639fc23aed81e5b70beab65a7987eb 100644 (file)
@@ -177,21 +177,26 @@ void wm_event_do_notifiers(bContext *C)
                                        ED_region_do_listen(ar, note);
                                }
                        }
-
-                       CTX_wm_window_set(C, NULL);
                }
                
+               CTX_wm_window_set(C, NULL);
+               
                MEM_freeN(note);
        }
        
        /* cached: editor refresh callbacks now, they get context */
        for(win= wm->windows.first; win; win= win->next) {
                ScrArea *sa;
+               CTX_wm_window_set(C, win);
                for(sa= win->screen->areabase.first; sa; sa= sa->next) {
-                       if(sa->do_refresh)
+                       if(sa->do_refresh) {
+                               CTX_wm_area_set(C, sa);
                                ED_area_do_refresh(C, sa);
+                       }
                }
+               CTX_wm_area_set(C, NULL);
        }
+       CTX_wm_window_set(C, NULL);
 }
 
 /* mark area-regions to redraw if overlapped with rect */