Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-27 16:46:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-27 16:46:13 +0300
commita8c1b792da8fecbb21db64f76e95922468aaea4b (patch)
tree02fea341291046b576977844631cd1be8615e273 /source/blender/editors/space_file
parent2d34420648e5feacf1237abc975f8ff2a0c2a907 (diff)
UI: use active-default button flag for the file selector
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/file_draw.c8
1 files changed, 6 insertions, 2 deletions
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, "");
}