diff options
author | Ton Roosendaal <ton@blender.org> | 2011-03-11 20:01:29 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-03-11 20:01:29 +0300 |
commit | 719bf206b4b79c06de966b6b4a2c3a06a04c713c (patch) | |
tree | a42a24db37e70dd90c6fe2850c4f9718b0b01e42 /source/blender/editors/space_file/space_file.c | |
parent | 01b547f9931970050e9e12e26a3ab61cfef54422 (diff) |
Bugfix #26444
Double click in File Window also loaded a file on double-click at
a directory.
The operator for it was using a Macro mistakingly here. On any double
click, it selected the item first and then executed load.
By default, any double click action has to rely on the first click
being properly handled before. Simply removing this macro, and assign
the "exec operator" to the double-click event works as expected.
A double click on a directory then just shows the dir (because the exec
requires an 'active' file item).
Diffstat (limited to 'source/blender/editors/space_file/space_file.c')
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 0c95bf482f2..d4240a9ad53 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -412,7 +412,8 @@ static void file_keymap(struct wmKeyConfig *keyconf) /* keys for main area */ keymap= WM_keymap_find(keyconf, "File Browser Main", SPACE_FILE, 0); - WM_keymap_add_item(keymap, "FILE_OT_select_execute", LEFTMOUSE, KM_DBL_CLICK, 0, 0); + kmi= WM_keymap_add_item(keymap, "FILE_OT_execute", LEFTMOUSE, KM_DBL_CLICK, 0, 0); + RNA_boolean_set(kmi->ptr, "need_active", 1); WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, 0, 0); kmi = WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, KM_SHIFT, 0); RNA_boolean_set(kmi->ptr, "extend", 1); |