Icons in outliner were jittering a bit on sizing of the area.
authorTon Roosendaal <ton@blender.org>
Tue, 1 Feb 2011 17:54:02 +0000 (17:54 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 1 Feb 2011 17:54:02 +0000 (17:54 +0000)
Subpixel position issue... when is this ever correct? :)

source/blender/editors/interface/view2d.c

index 3c74c38dfb6e3610ff2c9ec42e3641abccff69fc..245905418ec3da58f82bda6f06c1026958fb15a6 100644 (file)
@@ -991,12 +991,12 @@ void UI_view2d_view_ortho(View2D *v2d)
        
        /* XXX ton: this flag set by outliner, for icons */
        if(v2d->flag & V2D_PIXELOFS_X) {
-               curmasked.xmin= floor(curmasked.xmin) + 0.001f;
-               curmasked.xmax= floor(curmasked.xmax) + 0.001f;
+               curmasked.xmin= floor(curmasked.xmin) - 0.001f;
+               curmasked.xmax= floor(curmasked.xmax) - 0.001f;
        }
        if(v2d->flag & V2D_PIXELOFS_Y) {
-               curmasked.ymin= floor(curmasked.ymin) + 0.001f;
-               curmasked.ymax= floor(curmasked.ymax) + 0.001f;
+               curmasked.ymin= floor(curmasked.ymin) - 0.001f;
+               curmasked.ymax= floor(curmasked.ymax) - 0.001f;
        }
        
        /* set matrix on all appropriate axes */