Fix script_load_keymap failure from c9d9bfa84a

Scanning the keymap hierarchy (used in the preferences),
caused the test to fail.

Don't attempt add fallback keymaps for dynamic keymap callbacks.
This commit is contained in:
Campbell Barton
2021-09-21 22:17:08 +10:00
parent 69928307c5
commit fa6b1007ba

View File

@@ -539,7 +539,9 @@ class ToolSelectPanelHelper:
visited.add(km_name)
yield (km_name, cls.bl_space_type, 'WINDOW', [])
yield (km_name + " (fallback)", cls.bl_space_type, 'WINDOW', [])
# Callable types don't use fall-backs.
if isinstance(km_name, str):
yield (km_name + " (fallback)", cls.bl_space_type, 'WINDOW', [])
# -------------------------------------------------------------------------
# Layout Generators