[Bf-blender-cvs] [aba4a567032] blender2.8: UI: fix glitch showing the redo panel
Campbell Barton
noreply at git.blender.org
Thu Nov 8 05:45:10 CET 2018
Commit: aba4a567032a18b8e4c600b49b9839a538eb5c7c
Author: Campbell Barton
Date: Thu Nov 8 15:43:42 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBaba4a567032a18b8e4c600b49b9839a538eb5c7c
UI: fix glitch showing the redo panel
===================================================================
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 914b16586ed..8b4872ffc1d 100644
--- a/source/blender/editors/interface/interface_region_hud.c
+++ b/source/blender/editors/interface/interface_region_hud.c
@@ -302,14 +302,6 @@ void ED_area_type_hud_ensure(bContext *C, ScrArea *sa)
ar->type = art;
}
- ED_region_init(ar);
- ED_region_tag_redraw(ar);
-
- /* Reset zoom level (not well supported). */
- ar->v2d.cur = ar->v2d.tot = (rctf){.xmax = ar->winx, .ymax = ar->winy};
- ar->v2d.minzoom = 1.0f;
- ar->v2d.maxzoom = 1.0f;
-
/* 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) {
@@ -338,6 +330,20 @@ void ED_area_type_hud_ensure(bContext *C, ScrArea *sa)
}
}
+ if (init) {
+ /* This is needed or 'winrct' will be invalid. */
+ wmWindow *win = CTX_wm_window(C);
+ ED_area_update_region_sizes(wm, win, sa);
+ }
+
+ ED_region_init(ar);
+ ED_region_tag_redraw(ar);
+
+ /* Reset zoom level (not well supported). */
+ ar->v2d.cur = ar->v2d.tot = (rctf){.xmax = ar->winx, .ymax = ar->winy};
+ ar->v2d.minzoom = 1.0f;
+ ar->v2d.maxzoom = 1.0f;
+
/* XXX, should be handled in more general way. */
ar->visible = !((ar->flag & RGN_FLAG_HIDDEN) || (ar->flag & RGN_FLAG_TOO_SMALL));
@@ -347,6 +353,7 @@ void ED_area_type_hud_ensure(bContext *C, ScrArea *sa)
CTX_wm_region_set((bContext *)C, ar);
hud_region_layout(C, ar);
CTX_wm_region_set((bContext *)C, ar_prev);
+
}
/** \} */
More information about the Bf-blender-cvs
mailing list