[Bf-blender-cvs] [65b1ace] master: Fix T38447: Deactivated hotkeys are still showing in menu

Joshua Leung noreply at git.blender.org
Mon Feb 3 07:24:36 CET 2014


Commit: 65b1ace941eecaa29e22fb4945524ad9ecd59c4d
Author: Joshua Leung
Date:   Mon Feb 3 19:23:17 2014 +1300
https://developer.blender.org/rB65b1ace941eecaa29e22fb4945524ad9ecd59c4d

Fix T38447: Deactivated hotkeys are still showing in menu

===================================================================

M	source/blender/windowmanager/intern/wm_keymap.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 7caa5b3..c925a20 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -941,11 +941,15 @@ static wmKeyMapItem *wm_keymap_item_find_handlers(
 
 		if (keymap && (!keymap->poll || keymap->poll((bContext *)C))) {
 			for (kmi = keymap->items.first; kmi; kmi = kmi->next) {
+				/* skip disabled keymap items [T38447] */
+				if (kmi->flag & KMI_INACTIVE)
+					continue;
 				
 				if (strcmp(kmi->idname, opname) == 0 && WM_key_event_string(kmi->type)[0]) {
-					if (is_hotkey)
+					if (is_hotkey) {
 						if (!ISHOTKEY(kmi->type))
 							continue;
+					}
 
 					if (properties) {




More information about the Bf-blender-cvs mailing list