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:
authorJulian Eisel <eiseljulian@gmail.com>2019-09-08 21:31:12 +0300
committerJulian Eisel <eiseljulian@gmail.com>2019-09-08 21:35:56 +0300
commit1601413b63c1355fbb467c45b740c4f021b43f5f (patch)
tree598cf69d5eb918edcd055751c24a9c554782853c /source/blender/editors/space_file/space_file.c
parent7ab936c5b9e145b8de21e91a28a993c09d9274b1 (diff)
UI: Allow file number shortcuts ouside main region
Makes the numpad + and - type of shortcuts to increase/decrease the file number suffix work in the upper and lower bar of the file browser. Had to add keymap handlers to the execute region for this to work.
Diffstat (limited to 'source/blender/editors/space_file/space_file.c')
-rw-r--r--source/blender/editors/space_file/space_file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 7525ac5b705..d6a4eafc658 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -593,8 +593,14 @@ static void file_ui_region_draw(const bContext *C, ARegion *ar)
static void file_execution_region_init(wmWindowManager *wm, ARegion *ar)
{
+ wmKeyMap *keymap;
+
ED_region_panels_init(wm, ar);
ar->v2d.keepzoom |= V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y;
+
+ /* own keymap */
+ keymap = WM_keymap_ensure(wm->defaultconf, "File Browser", SPACE_FILE, 0);
+ WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
}
static void file_execution_region_draw(const bContext *C, ARegion *ar)