[Bf-blender-cvs] [16c46aabadf] blender2.8: Correct last commit

Campbell Barton noreply at git.blender.org
Mon Nov 26 07:45:22 CET 2018


Commit: 16c46aabadf7d23750c6967785c434553bfc9570
Author: Campbell Barton
Date:   Mon Nov 26 17:43:23 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB16c46aabadf7d23750c6967785c434553bfc9570

Correct last commit

Initial display was fixed, broke refreshing.

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

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 f951e26b830..aacb688b841 100644
--- a/source/blender/editors/interface/interface_region_hud.c
+++ b/source/blender/editors/interface/interface_region_hud.c
@@ -294,8 +294,9 @@ void ED_area_type_hud_ensure(bContext *C, ScrArea *sa)
 		return;
 	}
 
-	bool init = false;
 	ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_HUD);
+	bool init = false;
+	bool was_hidden = ar == NULL || ar->visible == false;
 	if (!last_redo_poll(C)) {
 		if (ar) {
 			ED_region_tag_redraw(ar);
@@ -360,10 +361,12 @@ void ED_area_type_hud_ensure(bContext *C, ScrArea *sa)
 	if (ar->visible) {
 		ARegion *ar_prev = CTX_wm_region(C);
 		CTX_wm_region_set((bContext *)C, ar);
-		ED_region_panels_layout(C, ar);
-		ar->winx = ar->v2d.winx;
-		ar->winy = ar->v2d.winy;
-		ar->v2d.cur = ar->v2d.tot = (rctf){.xmax = ar->winx, .ymax = ar->winy};
+		hud_region_layout(C, ar);
+		if (was_hidden) {
+			ar->winx = ar->v2d.winx;
+			ar->winy = ar->v2d.winy;
+			ar->v2d.cur = ar->v2d.tot = (rctf){.xmax = ar->winx, .ymax = ar->winy};
+		}
 		CTX_wm_region_set((bContext *)C, ar_prev);
 	}
 }



More information about the Bf-blender-cvs mailing list