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:
authorCampbell Barton <ideasman42@gmail.com>2015-09-16 19:51:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-09-16 19:55:30 +0300
commit5a13f8a750c7e9b20157fc5e3b4a518eaa295ef9 (patch)
tree1ddcc5a647c00e4b1d8d487f28d40cd6b9489e3f
parentcb4e3587353c0f477feef459e12ff14872143c9c (diff)
UI: Curve clipping didn't enforce zoom.
-rw-r--r--source/blender/blenkernel/intern/colortools.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index acfec306997..7a3cc118eb5 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -725,6 +725,16 @@ void curvemapping_changed(CurveMapping *cumap, const bool rem_doubles)
cmp[a].y -= dy;
}
}
+
+ /* ensure zoom-level respects clipping */
+ if (BLI_rctf_size_x(&cumap->curr) > BLI_rctf_size_x(&cumap->clipr)) {
+ cumap->curr.xmin = cumap->clipr.xmin;
+ cumap->curr.xmax = cumap->clipr.xmax;
+ }
+ if (BLI_rctf_size_y(&cumap->curr) > BLI_rctf_size_y(&cumap->clipr)) {
+ cumap->curr.ymin = cumap->clipr.ymin;
+ cumap->curr.ymax = cumap->clipr.ymax;
+ }
}