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:
authormano-wii <germano.costa@ig.com.br>2019-07-12 17:37:18 +0300
committermano-wii <germano.costa@ig.com.br>2019-07-12 17:37:18 +0300
commit8d4800990ce120d4202a7d1fb08ab78a2706aba1 (patch)
treed79e14e4053d429a64034a5d3867429a23710f1c /source/blender
parent18310ad5093b33114c62b9e212a4fd1552385f63 (diff)
Fix T66601: Redo Panels are empty the first time a workspace is active
We need to indicate a preferred size to avoid `RGN_FLAG_TOO_SMALL` the first time the region is created. Differential revision: https://developer.blender.org/D5238
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/interface/interface_region_hud.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_region_hud.c b/source/blender/editors/interface/interface_region_hud.c
index 6d1b2baeff9..43afdc534ad 100644
--- a/source/blender/editors/interface/interface_region_hud.c
+++ b/source/blender/editors/interface/interface_region_hud.c
@@ -27,6 +27,7 @@
#include "MEM_guardedalloc.h"
+#include "DNA_screen_types.h"
#include "DNA_userdef_types.h"
#include "BLI_string.h"
@@ -231,6 +232,11 @@ ARegionType *ED_area_type_hud(int space_type)
art->init = hud_region_init;
art->free = hud_region_free;
+ /* We need to indicate a preferred size to avoid false `RGN_FLAG_TOO_SMALL`
+ * the first time the region is created. */
+ art->prefsizex = AREAMINX;
+ art->prefsizey = HEADERY;
+
hud_panels_register(art, space_type, art->regionid);
art->lock = 1; /* can become flag, see BKE_spacedata_draw_locks */