2.5: Buttons View
[blender-staging.git] / source / blender / blenloader / intern / readfile.c
index bdb98a8ae724a66d36c87fc0aea21305aba47217..3029e48231299a6ef16bf777ac462ec8d9557a76 100644 (file)
@@ -4681,6 +4681,9 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype)
                }
        }
        
+       ar->v2d.tab_offset= NULL;
+       ar->v2d.tab_num= 0;
+       ar->v2d.tab_cur= 0;
        ar->handlers.first= ar->handlers.last= NULL;
        ar->uiblocks.first= ar->uiblocks.last= NULL;
        ar->headerstr= NULL;
@@ -5654,7 +5657,7 @@ static void area_add_header_region(ScrArea *sa, ListBase *lb)
        
        /* initialise view2d data for header region, to allow panning */
        /* is copy from ui_view2d.c */
-       ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPZOOM|V2D_KEEPASPECT);
+       ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT);
        ar->v2d.keepofs = V2D_LOCKOFS_Y;
        ar->v2d.keeptot = V2D_KEEPTOT_STRICT; 
        ar->v2d.align = V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y;
@@ -5847,7 +5850,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
                                memcpy(&ar->v2d, &snode->v2d, sizeof(View2D));
                                
                                ar->v2d.scroll= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
-                               ar->v2d.keepzoom= V2D_KEEPZOOM|V2D_KEEPASPECT;
+                               ar->v2d.keepzoom= V2D_LIMITZOOM|V2D_KEEPASPECT;
                                break;
                        }
                        case SPACE_BUTS:
@@ -5868,7 +5871,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
                                ar->regiontype= RGN_TYPE_WINDOW;
                                ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM_O);
                                ar->v2d.align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y);
-                               ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPZOOM|V2D_KEEPASPECT);
+                               ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT);
                                break;
                        }
                        case SPACE_TEXT:
@@ -8199,7 +8202,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                                        simasel->v2d.minzoom= 0.5f;
                                                        simasel->v2d.maxzoom= 1.21f;                                            
                                                        simasel->v2d.scroll= 0;
-                                                       simasel->v2d.keepzoom= V2D_KEEPZOOM|V2D_KEEPASPECT;
+                                                       simasel->v2d.keepzoom= V2D_LIMITZOOM|V2D_KEEPASPECT;
                                                        simasel->v2d.keeptot= 0;
                                                        simasel->prv_h = 96;
                                                        simasel->prv_w = 96;