From e76eb6a45af6b323fb1ea1cc1b775b4efa068adb Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 14 Jan 2004 14:47:41 +0000 Subject: [PATCH] - code that limited zooming in and zooming out for spaces like sequencer, audiotimeline, etc. was accidentally removed in 2.30 UI makeover. put it back. fixes report in tracker from Cessen, thnx! --- source/blender/src/buttons_editing.c | 2 +- source/blender/src/drawipo.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index d85fd384165..e4ea8827069 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -964,7 +964,7 @@ static void editing_panel_curve_type(Object *ob, Curve *cu) if(ob->type!=OB_SURF) { if(ob->type==OB_CURVE) { - static float prlen; + extern float prlen; // buttons_object.c, should be moved.... char str[32]; uiBlockBeginAlign(block); uiDefButS(block, NUM, B_RECALCPATH, "PathLen:", 600,50,150,19, &cu->pathlen, 1.0, 9000.0, 0, 0, ""); diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c index 5d3e18c5cb9..dd950a713b2 100644 --- a/source/blender/src/drawipo.c +++ b/source/blender/src/drawipo.c @@ -418,6 +418,33 @@ void test_view2d(View2D *v2d, int winx, int winy) cur->ymax= temp+0.5*dy; } } + else { + if(dxmin[0]) { + dx= G.v2d->min[0]; + temp= 0.5*(cur->xmax+cur->xmin); + cur->xmin= temp-0.5*dx; + cur->xmax= temp+0.5*dx; + } + else if(dx>G.v2d->max[0]) { + dx= G.v2d->max[0]; + temp= 0.5*(cur->xmax+cur->xmin); + cur->xmin= temp-0.5*dx; + cur->xmax= temp+0.5*dx; + } + + if(dymin[1]) { + dy= G.v2d->min[1]; + temp= 0.5*(cur->ymax+cur->ymin); + cur->ymin= temp-0.5*dy; + cur->ymax= temp+0.5*dy; + } + else if(dy>G.v2d->max[1]) { + dy= G.v2d->max[1]; + temp= 0.5*(cur->ymax+cur->ymin); + cur->ymin= temp-0.5*dy; + cur->ymax= temp+0.5*dy; + } + } if(v2d->keepaspect) { short do_x=0, do_y=0;