diff options
author | Ton Roosendaal <ton@blender.org> | 2013-02-27 21:12:57 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-02-27 21:12:57 +0400 |
commit | 2e830d05c47d4468180ddeca76c41482fd813bac (patch) | |
tree | f4a5eca249250490687e497d2a8a207aa09eca42 | |
parent | 4238d6d7581107310a31e8e588c96ed03342d034 (diff) |
Report #34450
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.
-rw-r--r-- | source/blender/editors/interface/view2d_ops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index c30d6c005be..daa78957231 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -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); |