Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-04 01:11:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-04 01:11:17 +0300
commitce3b49742decf64b3cb600dd2091feac07330b7b (patch)
treeef1ceec47f62e9c3c84a7e691fe32e6d8508a744 /source/blender
parent81fe9d2d04f463c2bbaea599d067beeca6ae2dac (diff)
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.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/screen/screen_edit.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index cd92c48f12a..a275de08356 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -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... */