From ba2d1c8898193e9a00dd60b84856d862b0b00e99 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 12 Aug 2020 19:20:42 +0200 Subject: [PATCH] Fix T79738: Double Click does not opening folders in File Browser If the File Browser was used in regular editor mode (e.g. not through an operation like File > Open), the operator that usually opens files and directories wouldn't execute. We need to keep two operators for double-click in the keymap so selecting and opening works in all cases. Caused by c606044157a3. --- .../presets/keyconfig/keymap_data/blender_default.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 6ce3ab6becb..dde718a45b4 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -1926,6 +1926,12 @@ def km_file_browser_main(params): items.extend([ ("file.execute", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, {"properties": [("need_active", True)]}), + # Both .execute and .select are needed here. The former only works if + # there's a file operator (i.e. not in regular editor mode) but is + # needed to load files. The latter makes selection work if there's no + # operator (i.e. in regular editor mode). + ("file.select", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, + {"properties": [("open", True), ("deselect_all", not params.legacy)]}), ("file.refresh", {"type": 'NUMPAD_PERIOD', "value": 'PRESS'}, None), ("file.select", {"type": 'LEFTMOUSE', "value": 'PRESS'}, {"properties": [("open", False), ("deselect_all", not params.legacy)]}),