From e32c1bd5d03148b123c8d2664b6164fe5cbd5c12 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 2 Nov 2017 18:19:11 +1100 Subject: UI: use button_operator in operator_menu_hold Move draw calls into UI_menutype_draw --- source/blender/windowmanager/intern/wm_operators.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 747ed48d383..2b96cca6653 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1892,10 +1892,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar UI_block_emboss_set(block, UI_EMBOSS); /* show the splash menu (containing interaction presets), using python */ if (mt) { - Menu menu = {NULL}; - menu.layout = layout; - menu.type = mt; - mt->draw(C, &menu); + UI_menutype_draw(C, mt, layout); // wmWindowManager *wm = CTX_wm_manager(C); // uiItemM(layout, C, "USERPREF_MT_keyconfigs", U.keyconfigstr, ICON_NONE); @@ -1952,10 +1949,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar mt = WM_menutype_find("USERPREF_MT_splash_footer", false); if (mt) { - Menu menu = {NULL}; - menu.layout = uiLayoutColumn(layout, false); - menu.type = mt; - mt->draw(C, &menu); + UI_menutype_draw(C, mt, uiLayoutColumn(layout, false)); } UI_block_bounds_set_centered(block, 0); -- cgit v1.2.3