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:
authorHarley Acheson <harley.acheson@gmail.com>2021-04-01 09:36:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-01 09:42:01 +0300
commita9fc5be5fa4cad5b12dfbed8ef3babaada96ab2a (patch)
treeeefd535aa763ffc52f78cd223a7589930547d7f0 /source/blender/editors/space_userpref
parentab652c2c90056f3631dc883443b75d28adbfa658 (diff)
Fix T86331: Preferences menu inaccessible until window resize
The RGN_TYPE_EXECUTE region was zero height - with the "Load & Save" button drawing outside of those bounds - so it didn't respond to events. This is because the region started off this size and does not change with simply adding the buttons. Although it has RGN_FLAG_DYNAMIC_SIZE, delayed reinit of regions is only currently supported on headers. This gives the execute region an initial (minimum) vertical size but also makes the region **hidden** by default. - Showing Prefs as an editor among others it will show the header but not the execute region. - Showing the Prefs in a popup window, hides the header region and shows the execute region. Ref D10636
Diffstat (limited to 'source/blender/editors/space_userpref')
-rw-r--r--source/blender/editors/space_userpref/space_userpref.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c
index d4692f156d3..ceba8ca268d 100644
--- a/source/blender/editors/space_userpref/space_userpref.c
+++ b/source/blender/editors/space_userpref/space_userpref.c
@@ -79,7 +79,7 @@ static SpaceLink *userpref_create(const ScrArea *area, const Scene *UNUSED(scene
BLI_addtail(&spref->regionbase, region);
region->regiontype = RGN_TYPE_EXECUTE;
region->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
- region->flag |= RGN_FLAG_DYNAMIC_SIZE;
+ region->flag |= RGN_FLAG_DYNAMIC_SIZE | RGN_FLAG_HIDDEN;
/* main region */
region = MEM_callocN(sizeof(ARegion), "main region for userpref");
@@ -251,6 +251,7 @@ void ED_spacetype_userpref(void)
/* regions: execution window */
art = MEM_callocN(sizeof(ARegionType), "spacetype userpref region");
art->regionid = RGN_TYPE_EXECUTE;
+ art->prefsizey = HEADERY;
art->init = userpref_execute_region_init;
art->layout = ED_region_panels_layout;
art->draw = ED_region_panels_draw;