[Bf-blender-cvs] [a8c1b792da8] master: UI: use active-default button flag for the file selector
Campbell Barton
noreply at git.blender.org
Wed Mar 27 14:48:25 CET 2019
Commit: a8c1b792da8fecbb21db64f76e95922468aaea4b
Author: Campbell Barton
Date: Thu Mar 28 00:46:13 2019 +1100
Branches: master
https://developer.blender.org/rBa8c1b792da8fecbb21db64f76e95922468aaea4b
UI: use active-default button flag for the file selector
===================================================================
M source/blender/editors/space_file/file_draw.c
===================================================================
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, "");
}
More information about the Bf-blender-cvs
mailing list