diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-12 06:59:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-12 07:01:00 +0300 |
commit | 5aeec318217729288bb16fd6ec0b09802f86f452 (patch) | |
tree | 96d46930d95b69de5b0fb27dc4852e6364f563bd /source/blender/editors/interface | |
parent | 30ed837473aae1c418b7cd08d1041acdec282e09 (diff) |
Fix hidden HUD region being used - zero winrct
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_region_hud.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_region_hud.c b/source/blender/editors/interface/interface_region_hud.c index 8b4872ffc1d..4b3d1980189 100644 --- a/source/blender/editors/interface/interface_region_hud.c +++ b/source/blender/editors/interface/interface_region_hud.c @@ -83,6 +83,14 @@ static bool last_redo_poll(const bContext *C) return success; } +static void hud_region_hide(ARegion *ar) +{ + ar->flag |= RGN_FLAG_HIDDEN; + /* Avoids setting 'AREA_FLAG_REGION_SIZE_UPDATE' + * since other regions don't depend on this. */ + BLI_rcti_init(&ar->winrct, 0, 0, 0, 0); +} + /** \} */ /* -------------------------------------------------------------------- */ @@ -169,7 +177,7 @@ static void hud_region_layout(const bContext *C, ARegion *ar) if (!ok) { ED_region_tag_redraw(ar); - ar->flag |= RGN_FLAG_HIDDEN; + hud_region_hide(ar); return; } @@ -265,7 +273,7 @@ void ED_area_type_hud_clear(wmWindowManager *wm, ScrArea *sa_keep) for (ARegion *ar = sa->regionbase.first; ar; ar = ar->next) { if (ar->regiontype == RGN_TYPE_HUD) { if ((ar->flag & RGN_FLAG_HIDDEN) == 0) { - ar->flag |= RGN_FLAG_HIDDEN; + hud_region_hide(ar); ED_region_tag_redraw(ar); ED_area_tag_redraw(sa); } @@ -291,7 +299,7 @@ void ED_area_type_hud_ensure(bContext *C, ScrArea *sa) if (!last_redo_poll(C)) { if (ar) { ED_region_tag_redraw(ar); - ar->flag |= RGN_FLAG_HIDDEN; + hud_region_hide(ar); } return; } |