diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-13 14:34:03 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-13 14:34:03 +0300 |
commit | e6897deec1999a7c23a42b31e4dc27ebe11227ab (patch) | |
tree | 84a0955056983a3ab34744b0ee721294aa9dcc7a /source/blender | |
parent | 4de30b2304025dc4a17b1d2bb0444040d5094e58 (diff) |
2.5
Bugfix in the "map cur with mask to region". Division had to be switched. :)
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/view2d.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index e6d9a86538c..95e68ee89f0 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -502,12 +502,9 @@ static void view2d_map_cur_using_mask(View2D *v2d, rctf *curmasked) { *curmasked= v2d->cur; - /* currently, the following 'hack' is only necessary for Outliner, and will cause - * errors in all other views... - */ - if ((v2d->scroll) && (v2d->keeptot==2)) { - float dx= ((float)(v2d->mask.xmax-v2d->mask.xmin+1))/(v2d->cur.xmax-v2d->cur.xmin); - float dy= ((float)(v2d->mask.ymax-v2d->mask.ymin+1))/(v2d->cur.ymax-v2d->cur.ymin); + if ((v2d->scroll)) { + float dx= (v2d->cur.xmax-v2d->cur.xmin)/((float)(v2d->mask.xmax-v2d->mask.xmin+1)); + float dy= (v2d->cur.ymax-v2d->cur.ymin)/((float)(v2d->mask.ymax-v2d->mask.ymin+1)); if (v2d->mask.xmin != 0) curmasked->xmin -= dx*(float)v2d->mask.xmin; |