diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-10 02:31:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-10 02:31:48 +0300 |
commit | 390dc94562ea01e41e560dbee1c481ad6b22eab7 (patch) | |
tree | 6310edfc0313845d576367413b574bd3274504c7 /release/scripts/startup/bl_ui | |
parent | 7cf8eed5e02a1f6525c3df2f404cb78db24adc98 (diff) |
Cleanup: avoid for loop
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index b4146a59ff6..cf0f710a05a 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -151,10 +151,10 @@ class VIEW3D_HT_header(Header): if show_snap: snap_items = bpy.types.ToolSettings.bl_rna.properties['snap_elements'].enum_items - if len(tool_settings.snap_elements) == 1: + snap_elements = tool_settings.snap_elements + if len(snap_elements) == 1: text = "" - for elem in tool_settings.snap_elements: - icon = snap_items[elem].icon + icon = snap_items[next(iter(snap_elements))].icon else: text = "Mix" icon = 'NONE' |