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>2018-09-11 15:39:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-11 15:39:38 +0300
commit7951adfb9c814bfac30549e3d74ef62a2634684e (patch)
treedecffe55b76c80aee33d3a99ad4bc96fa24a1dc8 /source/blender/editors/screen/area.c
parente1178266e713ae7184fc60c3ecb93d42d8b28a53 (diff)
UI: fix redo panel becoming permanently hidden
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 4ad40807c8b..606809090d6 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1183,6 +1183,7 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, rct
*
* This aligns to the lower left of the area.
*/
+ const int size_min[2] = {UI_UNIT_X, UI_UNIT_Y};
rcti overlap_remainder_margin = *overlap_remainder;
BLI_rcti_resize(
&overlap_remainder_margin,
@@ -1194,8 +1195,17 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, rct
ar->winrct.ymax = ar->winrct.ymin + ar->sizey - 1;
BLI_rcti_isect(&ar->winrct, &overlap_remainder_margin, &ar->winrct);
- if (BLI_rcti_size_x(&ar->winrct) < UI_UNIT_X ||
- BLI_rcti_size_y(&ar->winrct) < UI_UNIT_Y)
+
+ /* We need to use a test that wont have been previously clamped. */
+ rcti winrct_test = {
+ .xmin = ar->winrct.xmin,
+ .ymin = ar->winrct.ymin,
+ .xmax = ar->winrct.xmin + size_min[0],
+ .ymax = ar->winrct.ymin + size_min[1],
+ };
+ BLI_rcti_isect(&winrct_test, &overlap_remainder_margin, &winrct_test);
+ if (BLI_rcti_size_x(&winrct_test) < size_min[0] ||
+ BLI_rcti_size_y(&winrct_test) < size_min[1])
{
ar->flag |= RGN_FLAG_TOO_SMALL;
}