fix for glitch drawing file selector dividers (would draw apart or on top of each...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 2 Feb 2013 14:11:58 +0000 (14:11 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 2 Feb 2013 14:11:58 +0000 (14:11 +0000)
source/blender/editors/interface/view2d.c

index 41bbed8..ae89b25 100644 (file)
@@ -1029,16 +1029,16 @@ void UI_view2d_view_ortho(View2D *v2d)
        
        /* XXX ton: this flag set by outliner, for icons */
        if (v2d->flag & V2D_PIXELOFS_X) {
-               curmasked.xmin = floorf(curmasked.xmin) - 0.001f;
-               curmasked.xmax = floorf(curmasked.xmax) - 0.001f;
+               curmasked.xmin = floorf(curmasked.xmin) - (0.001f + xofs);
+               curmasked.xmax = floorf(curmasked.xmax) - (0.001f + xofs);
        }
        if (v2d->flag & V2D_PIXELOFS_Y) {
-               curmasked.ymin = floorf(curmasked.ymin) - 0.001f;
-               curmasked.ymax = floorf(curmasked.ymax) - 0.001f;
+               curmasked.ymin = floorf(curmasked.ymin) - (0.001f + yofs);
+               curmasked.ymax = floorf(curmasked.ymax) - (0.001f + yofs);
        }
        
        /* set matrix on all appropriate axes */
-       wmOrtho2(curmasked.xmin - xofs, curmasked.xmax - xofs, curmasked.ymin - yofs, curmasked.ymax - yofs);
+       wmOrtho2(curmasked.xmin, curmasked.xmax, curmasked.ymin, curmasked.ymax);
 
        /* XXX is this necessary? */
        glLoadIdentity();