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>2008-12-13 14:34:03 +0300
committerTon Roosendaal <ton@blender.org>2008-12-13 14:34:03 +0300
commite6897deec1999a7c23a42b31e4dc27ebe11227ab (patch)
tree84a0955056983a3ab34744b0ee721294aa9dcc7a /source/blender/editors
parent4de30b2304025dc4a17b1d2bb0444040d5094e58 (diff)
2.5
Bugfix in the "map cur with mask to region". Division had to be switched. :)
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/view2d.c9
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;