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:
authorTon Roosendaal <ton@blender.org>2004-12-08 18:11:52 +0300
committerTon Roosendaal <ton@blender.org>2004-12-08 18:11:52 +0300
commit7662f80b75c45bdf82dfd540e533c6324ac21e65 (patch)
tree8f0a99daacceacd91332ee84abb575d35cbec275 /source/blender/src/drawipo.c
parentfe3166e140c023388a5331f67e7f34a81434c725 (diff)
Bug fix #1985
Using ctrl+up/down in buttons window, didn't use a proper rescale of view as already works for dragging window edges. Now the 'Full window' action keeps size nicely.
Diffstat (limited to 'source/blender/src/drawipo.c')
-rw-r--r--source/blender/src/drawipo.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c
index 53b208f498c..2890a3222b4 100644
--- a/source/blender/src/drawipo.c
+++ b/source/blender/src/drawipo.c
@@ -463,16 +463,21 @@ void test_view2d(View2D *v2d, int winx, int winy)
find which is the best new 'cur' rect. thats why it stores 'old' */
if(winx!=v2d->oldwinx) do_x= 1;
if(winy!=v2d->oldwiny) do_y= 1;
- v2d->oldwinx= winx;
- v2d->oldwiny= winy;
dx= (cur->ymax-cur->ymin)/(cur->xmax-cur->xmin);
dy= ((float)winy)/((float)winx);
- if(do_x==do_y) {
- if( dy > 1.0) do_x= 0; else do_x= 1;
+ if(do_x==do_y) { // both sizes change, ctrl+uparrow
+ if(do_x==1 && do_y==1) {
+ if( ABS(winx-v2d->oldwinx)>ABS(winy-v2d->oldwiny)) do_y= 0;
+ else do_x= 0;
+ }
+ else if( dy > 1.0) do_x= 0; else do_x= 1;
}
-
+
+ v2d->oldwinx= winx;
+ v2d->oldwiny= winy;
+
if( do_x ) {
/* portrait window: correct for x */