Fix T37746: Presets in splash failed to redraw
This commit is contained in:
parent
6c8f2049f6
commit
af980a20a4
@ -113,11 +113,11 @@ class USERPREF_MT_splash(Menu):
|
||||
row.label("")
|
||||
row = split.row()
|
||||
row.label("Interaction:")
|
||||
# XXX, no redraws
|
||||
# text = bpy.path.display_name(context.window_manager.keyconfigs.active.name)
|
||||
# if not text:
|
||||
# text = "Blender (default)"
|
||||
row.menu("USERPREF_MT_appconfigs", text="Preset")
|
||||
|
||||
text = bpy.path.display_name(context.window_manager.keyconfigs.active.name)
|
||||
if not text:
|
||||
text = "Blender (default)"
|
||||
row.menu("USERPREF_MT_appconfigs", text=text)
|
||||
|
||||
|
||||
# only for addons
|
||||
|
@ -1853,17 +1853,10 @@ static void wm_block_splash_close(bContext *C, void *arg_block, void *UNUSED(arg
|
||||
|
||||
static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unused);
|
||||
|
||||
/* XXX: hack to refresh splash screen with updated preset menu name,
|
||||
* since popup blocks don't get regenerated like panels do */
|
||||
static void wm_block_splash_refreshmenu(bContext *UNUSED(C), void *UNUSED(arg_block), void *UNUSED(arg))
|
||||
static void wm_block_splash_refreshmenu(bContext *C, void *UNUSED(arg_block), void *UNUSED(arg))
|
||||
{
|
||||
/* ugh, causes crashes in other buttons, disabling for now until
|
||||
* a better fix */
|
||||
#if 0
|
||||
wmWindow *win = CTX_wm_window(C);
|
||||
UI_popup_block_close(C, win, arg_block);
|
||||
UI_popup_block_invoke(C, wm_block_create_splash, NULL);
|
||||
#endif
|
||||
ARegion *ar_menu = CTX_wm_menu(C);
|
||||
ED_region_tag_refresh_ui(ar_menu);
|
||||
}
|
||||
|
||||
static int wm_resource_check_prev(void)
|
||||
@ -1945,7 +1938,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
|
||||
/* note on UI_BLOCK_NO_WIN_CLIP, the window size is not always synchronized
|
||||
* with the OS when the splash shows, window clipping in this case gives
|
||||
* ugly results and clipping the splash isn't useful anyway, just disable it [#32938] */
|
||||
UI_block_flag_enable(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_NO_WIN_CLIP);
|
||||
UI_block_flag_enable(block, UI_BLOCK_LOOP | UI_BLOCK_KEEP_OPEN | UI_BLOCK_NO_WIN_CLIP);
|
||||
|
||||
/* XXX splash scales with pixelsize, should become widget-units */
|
||||
but = uiDefBut(block, UI_BTYPE_IMAGE, 0, "", 0, 0.5f * U.widget_unit, U.pixelsize * 501, U.pixelsize * 282, ibuf, 0.0, 0.0, 0, 0, ""); /* button owns the imbuf now */
|
||||
|
Loading…
Reference in New Issue
Block a user