Fix #23208: REGION_DRAW_POST_PIXEL callbacks only work in 3d view and
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 6 Aug 2010 18:11:49 +0000 (18:11 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 6 Aug 2010 18:11:49 +0000 (18:11 +0000)
image editor, but there's no reason they wouldn't work in all regions,
so moved the function call.

source/blender/editors/screen/area.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_view3d/view3d_draw.c

index a97f8f1..3712ef0 100644 (file)
@@ -48,6 +48,7 @@
 
 #include "ED_screen.h"
 #include "ED_screen_types.h"
+#include "ED_space_api.h"
 #include "ED_types.h"
 #include "ED_fileselect.h" 
 
@@ -343,6 +344,8 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
        else if(at->draw) {
                at->draw(C, ar);
        }
+
+       ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_PIXEL);
        
        uiFreeInactiveBlocks(C, &ar->uiblocks);
        
index 3eae143..9cd6779 100644 (file)
@@ -776,8 +776,6 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
 
        /* draw Grease Pencil - screen space only */
        draw_image_grease_pencil((bContext *)C, 0);
-
-       ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_PIXEL);
        
        /* scrollers? */
        /*scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_UNIT_VALUES, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
index 6395e9e..2be746a 100644 (file)
@@ -2433,8 +2433,6 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
        ob= OBACT;
        if(U.uiflag & USER_DRAWVIEWINFO) 
                draw_selected_name(scene, ob, v3d);
-
-       ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_PIXEL);
        
        /* XXX here was the blockhandlers for floating panels */