[Bf-blender-cvs] [5a13f8a] master: UI: Curve clipping didn't enforce zoom.

Campbell Barton noreply at git.blender.org
Wed Sep 16 19:01:02 CEST 2015


Commit: 5a13f8a750c7e9b20157fc5e3b4a518eaa295ef9
Author: Campbell Barton
Date:   Thu Sep 17 02:51:50 2015 +1000
Branches: master
https://developer.blender.org/rB5a13f8a750c7e9b20157fc5e3b4a518eaa295ef9

UI: Curve clipping didn't enforce zoom.

===================================================================

M	source/blender/blenkernel/intern/colortools.c

===================================================================

diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index acfec30..7a3cc11 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;
+		}
 	}




More information about the Bf-blender-cvs mailing list