UI: fix error for tools w/o a keymap

This commit is contained in:
2018-05-21 13:06:59 +02:00
parent 3b1b625ead
commit fbe73d1f31

View File

@@ -614,8 +614,11 @@ def keymap_from_context(context, space_type):
kmi.properties.name = item.text
continue
if item.keymap:
kmi_first = item.keymap[0].keymap_items[0]
if not item.keymap:
continue
# Only check the first item in the tools key-map (a little arbitrary).
kmi_first = item.keymap[0].keymap_items[0]
kmi_found = wm.keyconfigs.find_item_from_operator(
idname=kmi_first.idname,
# properties=kmi_first.properties, # prevents matches, don't use.