fix for #24428, commit r32757 broke menu bar display for some users [#24454] (but not me for some reason).

For now revert most of r32757.
This commit is contained in:
Campbell Barton 2010-11-03 22:11:17 +00:00
parent 81fe9d2d04
commit ce3b49742d

@ -608,10 +608,6 @@ void select_connected_scredge(bScreen *sc, ScrEdge *edge)
}
/* test if screen vertices should be scaled */
/* needed to alternate AREAGRID snapping else it shifts one way
* to avoid this we should use floats at least during runtime [#24428]. */
static char scale_alt_bool= 0;
static void screen_test_scale(bScreen *sc, int winsizex, int winsizey)
{
ScrVert *sv=NULL;
@ -647,26 +643,22 @@ static void screen_test_scale(bScreen *sc, int winsizex, int winsizey)
/* make sure it fits! */
for(sv= sc->vertbase.first; sv; sv= sv->next) {
/* 0.1519 was 0.5f, but tweaked so resizing the window doesnt favor one direction
* also note scale_alt_bool */
/* FIXME, this resizing logic is no good when resizing the window + redrawing [#24428]
* need some way to store these as floats internally and re-apply from there. */
tempf= ((float)sv->vec.x)*facx;
sv->vec.x= (short)(tempf+0.1519);
sv->vec.x= (short)(tempf+0.5);
sv->vec.x+= AREAGRID-2;
sv->vec.x-= scale_alt_bool;
sv->vec.x-= (sv->vec.x % AREAGRID);
CLAMP(sv->vec.x, 0, winsizex);
tempf= ((float)sv->vec.y )*facy;
sv->vec.y= (short)(tempf+0.1519);
tempf= ((float)sv->vec.y)*facy;
sv->vec.y= (short)(tempf+0.5);
sv->vec.y+= AREAGRID-2;
sv->vec.y-= scale_alt_bool;
sv->vec.y-= (sv->vec.y % AREAGRID);
CLAMP(sv->vec.y, 0, winsizey);
}
scale_alt_bool= scale_alt_bool ? 0:1;
}
/* test for collapsed areas. This could happen in some blender version... */