[Bf-blender-cvs] [fb4bb611559] master: Fix T62608: many tools in the toolbar not working.

Brecht Van Lommel noreply at git.blender.org
Fri Mar 15 19:32:39 CET 2019


Commit: fb4bb611559bdb9d7f7b5206a812965c9223c0a9
Author: Brecht Van Lommel
Date:   Fri Mar 15 19:29:20 2019 +0100
Branches: master
https://developer.blender.org/rBfb4bb611559bdb9d7f7b5206a812965c9223c0a9

Fix T62608: many tools in the toolbar not working.

The keymap names still use the label, so use that again for looking up the
keymap so things work again after recent changes.

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

M	release/scripts/startup/bl_ui/space_toolsystem_common.py

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

diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index e893ee89e52..4e3cecf2631 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -309,8 +309,8 @@ class ToolSelectPanelHelper:
         return context.button_operator.name
 
     @classmethod
-    def _km_action_simple(cls, kc, context_descr, idname, keymap_fn):
-        km_idname = f"{cls.keymap_prefix:s} {context_descr:s}, {idname:s}"
+    def _km_action_simple(cls, kc, context_descr, label, keymap_fn):
+        km_idname = f"{cls.keymap_prefix:s} {context_descr:s}, {label:s}"
         km = kc.keymaps.get(km_idname)
         if km is None:
             km = kc.keymaps.new(km_idname, space_type=cls.bl_space_type, region_type='WINDOW', tool=True)
@@ -355,7 +355,7 @@ class ToolSelectPanelHelper:
             for item in cls._tools_flatten_with_keymap(tools):
                 keymap_data = item.keymap
                 if callable(keymap_data[0]):
-                    cls._km_action_simple(kc, context_descr, item.idname, keymap_data)
+                    cls._km_action_simple(kc, context_descr, item.label, keymap_data)
 
     @classmethod
     def keymap_ui_hierarchy(cls, context_mode):



More information about the Bf-blender-cvs mailing list