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:
authorTon Roosendaal <ton@blender.org>2010-12-15 21:09:25 +0300
committerTon Roosendaal <ton@blender.org>2010-12-15 21:09:25 +0300
commit29d2e534631ff1aa8da35549c022647734642494 (patch)
tree2740b9fadbbdcb40da1471b1ea7ebc1d54017669 /source/blender/windowmanager
parent7e10a9e6ce3d788e28ee39c9d2e94605d2a0ba47 (diff)
Bugfix, own collection
Using RMB on menus to change hotkeys was broken. - the input button was on a weird place outside menu, assign would close pulldown, so you had to reopen to check - ESC didn't close the button, but assigned ESC as hotkey. This key is a protected key, and always should be escaping. - Worst bug: if you used this on a 'user keymap' it removed all entries from the map...
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c4
-rw-r--r--source/blender/windowmanager/wm_event_types.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index df635c0ccb2..a3f662cbbf3 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -652,6 +652,10 @@ wmKeyMap *WM_keymap_copy_to_user(wmKeyMap *keymap)
usermap= WM_keymap_list_find(&U.keymaps, keymap->idname, keymap->spaceid, keymap->regionid);
+ /* XXX this function is only used by RMB setting hotkeys, and it clears maps on 2nd try this way */
+ if(keymap==usermap)
+ return keymap;
+
if(!usermap) {
/* not saved yet, duplicate existing */
usermap= MEM_dupallocN(keymap);
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h
index 822b36392ce..5d7eb625f78 100644
--- a/source/blender/windowmanager/wm_event_types.h
+++ b/source/blender/windowmanager/wm_event_types.h
@@ -227,7 +227,7 @@
#define ISTWEAK(event) (event >= EVT_TWEAK_L && event <= EVT_GESTURE)
/* test whether event type is acceptable as hotkey, excluding modifiers */
-#define ISHOTKEY(event) ((ISKEYBOARD(event) || ISMOUSE(event)) && !(event>=LEFTCTRLKEY && event<=LEFTSHIFTKEY) && !(event>=UNKNOWNKEY && event<=GRLESSKEY))
+#define ISHOTKEY(event) ((ISKEYBOARD(event) || ISMOUSE(event)) && event!=ESCKEY && !(event>=LEFTCTRLKEY && event<=LEFTSHIFTKEY) && !(event>=UNKNOWNKEY && event<=GRLESSKEY))
/* **************** BLENDER GESTURE EVENTS (0x5000) **************** */