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>2019-03-14 01:58:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-14 01:59:03 +0300
commit3a58e97aed963b43984250e6ce40cd863b71e4b6 (patch)
tree3ff086b75e7f9b82a556e455b728f0e56191510b /source/blender/editors/interface/interface_region_hud.c
parentdaaabd076d125d7b61b00ff49fbca04bbf9c3129 (diff)
Fix T62526: Can't scroll redo panel
Diffstat (limited to 'source/blender/editors/interface/interface_region_hud.c')
-rw-r--r--source/blender/editors/interface/interface_region_hud.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_region_hud.c b/source/blender/editors/interface/interface_region_hud.c
index e874609f61e..f6a5c9611af 100644
--- a/source/blender/editors/interface/interface_region_hud.c
+++ b/source/blender/editors/interface/interface_region_hud.c
@@ -178,9 +178,19 @@ static void hud_region_layout(const bContext *C, ARegion *ar)
ED_region_panels_layout(C, ar);
if (ar->panels.first && (ar->sizey != size_y)) {
+ int winx_new = UI_DPI_FAC * (ar->sizex + 0.5f);
+ int winy_new = UI_DPI_FAC * (ar->sizey + 0.5f);
View2D *v2d = &ar->v2d;
- ar->winx = ar->sizex * UI_DPI_FAC;
- ar->winy = ar->sizey * UI_DPI_FAC;
+
+ if (ar->flag & RGN_FLAG_SIZE_CLAMP_X) {
+ CLAMP_MAX(winx_new, ar->winx);
+ }
+ if (ar->flag & RGN_FLAG_SIZE_CLAMP_Y) {
+ CLAMP_MAX(winy_new, ar->winy);
+ }
+
+ ar->winx = winx_new;
+ ar->winy = winy_new;
ar->winrct.xmax = (ar->winrct.xmin + ar->winx) - 1;
ar->winrct.ymax = (ar->winrct.ymin + ar->winy) - 1;