Revision: 21626
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21626
Author:   aligorith
Date:     2009-07-16 13:05:16 +0200 (Thu, 16 Jul 2009)

Log Message:
-----------
2.5 - View2D fixes for User Prefs

Added NULL check for View2D code for invalid style pointer (this underlying 
problem should get addressed at some point), and reinstated the 
reinitialisation hack for panel regions.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/interface/view2d.c
    branches/blender2.5/blender/source/blender/editors/screen/area.c

Modified: branches/blender2.5/blender/source/blender/editors/interface/view2d.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/view2d.c       
2009-07-16 10:32:21 UTC (rev 21625)
+++ branches/blender2.5/blender/source/blender/editors/interface/view2d.c       
2009-07-16 11:05:16 UTC (rev 21626)
@@ -254,6 +254,8 @@
                        /* panels view, with horizontal/vertical align */
                        case V2D_COMMONVIEW_PANELS_UI:
                        {
+                               float panelzoom= (style) ? style->panelzoom : 
1.0f;
+                               
                                /* for now, aspect ratio should be maintained, 
and zoom is clamped within sane default limits */
                                v2d->keepzoom= (V2D_KEEPASPECT|V2D_KEEPZOOM);
                                v2d->minzoom= 0.5f;
@@ -271,13 +273,10 @@
                                v2d->tot.ymin= -winy;
                                
                                v2d->cur.xmin= 0.0f;
-                               v2d->cur.xmax= winx*style->panelzoom;
+                               v2d->cur.xmax= winx*panelzoom;
                                
                                v2d->cur.ymax= 0.0f;
-                               v2d->cur.ymin= -winy*style->panelzoom;
-                               
-                               v2d->cur.ymax= 0.0f;
-                               v2d->cur.ymin= -winy*style->panelzoom;
+                               v2d->cur.ymin= -winy*panelzoom;
                        }
                                break;
                                

Modified: branches/blender2.5/blender/source/blender/editors/screen/area.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/screen/area.c    
2009-07-16 10:32:21 UTC (rev 21625)
+++ branches/blender2.5/blender/source/blender/editors/screen/area.c    
2009-07-16 11:05:16 UTC (rev 21626)
@@ -1256,9 +1256,11 @@
        ListBase *keymap;
        
        // XXX quick hacks for files saved with 2.5 already (i.e. the builtin 
defaults file)
+               // scrollbars for button regions
        ar->v2d.scroll |= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM); 
-       //if(!(ar->v2d.align & V2D_ALIGN_NO_POS_Y))
-       //      ar->v2d.flag &= ~V2D_IS_INITIALISED;
+               // correctly initialised User-Prefs?
+       if(!(ar->v2d.align & V2D_ALIGN_NO_POS_Y))
+               ar->v2d.flag &= ~V2D_IS_INITIALISED;
        
        UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_PANELS_UI, ar->winx, 
ar->winy);
 


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to