diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2019-12-04 18:00:03 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2019-12-04 18:02:58 +0300 |
commit | 7868db9343d577784aa754418f2b888793a01d25 (patch) | |
tree | 56b4cb1d1ef6f813cc1881d50d2e26e89a8912ca /source/blender/editors/screen/area.c | |
parent | 824c2659382b2c76c3e6ec53ca598647af104446 (diff) |
Make curve decimation only take into account the selected curve points
Previously the decimation would take the whole curve into account when
decimating and not just the selected part.
This also contains various smaller bug fixes for the fcurve decimation.
Reviewed By: Sybren
Differential Revision: http://developer.blender.org/D6286
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r-- | source/blender/editors/screen/area.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index ccee88eb0d6..36a2b4c2893 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1280,11 +1280,12 @@ static void region_rect_recursive( */ const int size_min[2] = {UI_UNIT_X, UI_UNIT_Y}; rcti overlap_remainder_margin = *overlap_remainder; + BLI_rcti_resize(&overlap_remainder_margin, max_ii(0, BLI_rcti_size_x(overlap_remainder) - UI_UNIT_X / 2), max_ii(0, BLI_rcti_size_y(overlap_remainder) - UI_UNIT_Y / 2)); - ar->winrct.xmin = overlap_remainder_margin.xmin; - ar->winrct.ymin = overlap_remainder_margin.ymin; + ar->winrct.xmin = overlap_remainder_margin.xmin + ar->runtime.offset_x; + ar->winrct.ymin = overlap_remainder_margin.ymin + ar->runtime.offset_y; ar->winrct.xmax = ar->winrct.xmin + prefsizex - 1; ar->winrct.ymax = ar->winrct.ymin + prefsizey - 1; |