From a8c1b792da8fecbb21db64f76e95922468aaea4b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 28 Mar 2019 00:46:13 +1100 Subject: UI: use active-default button flag for the file selector --- source/blender/editors/space_file/file_draw.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_file') diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 8156e62a427..c0aa03abece 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -241,8 +241,12 @@ void file_draw_buttons(const bContext *C, ARegion *ar) str_exec = params->title; /* params->title is already translated! */ } - uiDefButO(block, UI_BTYPE_BUT, "FILE_OT_execute", WM_OP_EXEC_REGION_WIN, str_exec, - max_x - loadbutton, line1_y, loadbutton, btn_h, ""); + but = uiDefButO( + block, UI_BTYPE_BUT, "FILE_OT_execute", WM_OP_EXEC_REGION_WIN, str_exec, + max_x - loadbutton, line1_y, loadbutton, btn_h, ""); + /* Just a display hint. */ + UI_but_flag_enable(but, UI_BUT_ACTIVE_DEFAULT); + uiDefButO(block, UI_BTYPE_BUT, "FILE_OT_cancel", WM_OP_EXEC_REGION_WIN, IFACE_("Cancel"), max_x - loadbutton, line2_y, loadbutton, btn_h, ""); } -- cgit v1.2.3