View2D: Presets for Initialising Views
[blender.git] / source / blender / editors / space_image / space_image.c
index 6cefcd8321bca251535e659e6902ab931cecef92..7d34f724de2d58e694b754ffe880a73b852a9b43 100644 (file)
@@ -83,7 +83,6 @@ static SpaceLink *image_new(void)
        BLI_addtail(&simage->regionbase, ar);
        ar->regiontype= RGN_TYPE_HEADER;
        ar->alignment= RGN_ALIGN_BOTTOM;
        BLI_addtail(&simage->regionbase, ar);
        ar->regiontype= RGN_TYPE_HEADER;
        ar->alignment= RGN_ALIGN_BOTTOM;
-       UI_view2d_header_default(&ar->v2d);
        
        /* main area */
        ar= MEM_callocN(sizeof(ARegion), "main area for image");
        
        /* main area */
        ar= MEM_callocN(sizeof(ARegion), "main area for image");
@@ -132,7 +131,7 @@ static void image_main_area_init(wmWindowManager *wm, ARegion *ar)
 {
        ListBase *keymap;
        
 {
        ListBase *keymap;
        
-       UI_view2d_size_update(&ar->v2d, ar->winx, ar->winy);
+       UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_VIEWCANVAS, ar->winx, ar->winy);
        
        /* own keymap */
        keymap= WM_keymap_listbase(wm, "Image", SPACE_IMAGE, 0);        /* XXX weak? */
        
        /* own keymap */
        keymap= WM_keymap_listbase(wm, "Image", SPACE_IMAGE, 0);        /* XXX weak? */
@@ -175,7 +174,7 @@ void image_keymap(struct wmWindowManager *wm)
 /* add handlers, stuff you only do once or on area/region changes */
 static void image_header_area_init(wmWindowManager *wm, ARegion *ar)
 {
 /* add handlers, stuff you only do once or on area/region changes */
 static void image_header_area_init(wmWindowManager *wm, ARegion *ar)
 {
-       UI_view2d_size_update(&ar->v2d, ar->winx, ar->winy);
+       UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
 }
 
 static void image_header_area_draw(const bContext *C, ARegion *ar)
 }
 
 static void image_header_area_draw(const bContext *C, ARegion *ar)