From a9fc5be5fa4cad5b12dfbed8ef3babaada96ab2a Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Thu, 1 Apr 2021 17:36:09 +1100 Subject: 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 --- source/blender/editors/screen/screen_ops.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/screen/screen_ops.c') diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 797c3bcf132..5cd4e8c353b 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -4863,6 +4863,11 @@ static int userpref_show_exec(bContext *C, wmOperator *op) region->flag |= RGN_FLAG_HIDDEN; ED_region_visibility_change_update(C, area, region); + /* And also show the region with "Load & Save" buttons. */ + region = BKE_area_find_region_type(area, RGN_TYPE_EXECUTE); + region->flag &= ~RGN_FLAG_HIDDEN; + ED_region_visibility_change_update(C, area, region); + return OPERATOR_FINISHED; } BKE_report(op->reports, RPT_ERROR, "Failed to open window!"); -- cgit v1.2.3