Fix for 2.66a

Some editors in Blender (Like Graph) have "maxzoom" set to 0, which caused the 
MMB zoom sensitivity to be minimal. That used to be much more responsive, restored
it to how it worked before.
This commit is contained in:
Ton Roosendaal
2013-02-27 17:12:57 +00:00
parent 4238d6d758
commit 2e830d05c4

View File

@@ -1034,10 +1034,11 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event)
}
else {
/* 'continuous' or 'dolly' */
float fac, zoomfac = 0.001f * v2d->maxzoom;
float fac, zoomfac = 0.01f;
/* some view2d's (graph) don't have min/max zoom, or extreme ones */
CLAMP (zoomfac, 0.001f, 0.01f);
if (v2d->maxzoom > 0.0f)
zoomfac = CLAMPIS(0.001f * v2d->maxzoom, 0.001f, 0.01f);
/* x-axis transform */
fac = zoomfac * (event->x - vzd->lastx);