[Bf-blender-cvs] [0ab8f9c74a9] blender2.8: UI: fix hud panel refresh glitch

Campbell Barton noreply at git.blender.org
Wed Jun 13 09:22:15 CEST 2018


Commit: 0ab8f9c74a9df9979e02379a6447545d04af154a
Author: Campbell Barton
Date:   Wed Jun 13 09:21:09 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB0ab8f9c74a9df9979e02379a6447545d04af154a

UI: fix hud panel refresh glitch

===================================================================

M	source/blender/editors/interface/interface_region_hud.c

===================================================================

diff --git a/source/blender/editors/interface/interface_region_hud.c b/source/blender/editors/interface/interface_region_hud.c
index 89e1ad9be7b..58fca616a22 100644
--- a/source/blender/editors/interface/interface_region_hud.c
+++ b/source/blender/editors/interface/interface_region_hud.c
@@ -261,6 +261,9 @@ void ED_area_type_hud_ensure(bContext *C, ScrArea *sa)
 	ED_region_init(ar);
 	ED_region_tag_redraw(ar);
 
+	/* Reset zoom level (not well supported). */
+	ar->v2d.cur = (rctf){.xmax = ar->winx, .ymax = ar->winy};
+
 	/* Let 'ED_area_update_region_sizes' do the work of placing the region.
 	 * Otherwise we could set the 'ar->winrct' & 'ar->winx/winy' here. */
 	if (init) {
@@ -271,9 +274,11 @@ void ED_area_type_hud_ensure(bContext *C, ScrArea *sa)
 			sa->flag |= AREA_FLAG_REGION_SIZE_UPDATE;
 		}
 		ar->flag &= ~RGN_FLAG_HIDDEN;
-
 	}
 
+	/* XXX, should be handled in more general way. */
+	ar->visible = !((ar->flag & RGN_FLAG_HIDDEN) || (ar->flag & RGN_FLAG_TOO_SMALL));
+
 	/* We shouldn't need to do this every time :S */
 	/* XXX, this is evil! - it also makes the menu show on first draw. :( */
 	hud_region_layout(C, ar);



More information about the Bf-blender-cvs mailing list