From 2d34420648e5feacf1237abc975f8ff2a0c2a907 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 27 Mar 2019 21:39:44 +1100 Subject: UI: support an 'active default' button for pop-ups Use this for the save confirmation dialog so it has a default action when pressing enter which draws with a highlight so it's clear what the default action is (the dialog was just closing before). Resolves T57686 --- source/blender/windowmanager/intern/wm_window.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 3181ee0f937..a4c953fd958 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -433,6 +433,7 @@ static uiBlock *block_create_confirm_quit(struct bContext *C, struct ARegion *ar block, UI_BTYPE_BUT, 0, ICON_FILE_TICK, IFACE_("Save & Quit"), 0, 0, 50, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Save and quit")); UI_but_func_set(but, wm_block_confirm_quit_save, block, NULL); + UI_but_flag_enable(but, UI_BUT_ACTIVE_DEFAULT); UI_block_bounds_set_centered(block, 10); -- cgit v1.2.3