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:
authorCampbell Barton <ideasman42@gmail.com>2019-12-12 13:09:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-12-12 13:09:22 +0300
commit059f7413c4cf2fed8a4189ade4a609f9758f6022 (patch)
tree1f40b971a70508854b323c4cdbaea12c4b59abb9 /release/scripts/startup/bl_ui/space_toolsystem_common.py
parent379bb0706caa62bfa96b2219c4493402fa8a836c (diff)
Cleanup: redundant NULL checks, simplify tool fallback arg checks
Diffstat (limited to 'release/scripts/startup/bl_ui/space_toolsystem_common.py')
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_common.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 8c5f2e9cbe5..532f5e023b6 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -929,9 +929,8 @@ def _activate_by_item(context, space_type, item, index, *, as_fallback=False):
data_block=item.data_block or "",
operator=item.operator or "",
index=index,
-
- idname_fallback=item_fallback.idname if item_fallback else "",
- keymap_fallback=item_fallback.keymap[0] if (item_fallback and item_fallback.keymap) else "",
+ idname_fallback=(item_fallback and item_fallback.idname) or "",
+ keymap_fallback=(item_fallback and item_fallback.keymap and item_fallback.keymap[0]) or "",
)
WindowManager = bpy.types.WindowManager