Cleanup: use equality instead of contains for single-item sets
This commit is contained in:
@@ -18,7 +18,7 @@ class MESH_UL_mylist(bpy.types.UIList):
|
||||
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
||||
pass
|
||||
# 'GRID' layout type should be as compact as possible (typically a single icon!).
|
||||
elif self.layout_type in {'GRID'}:
|
||||
elif self.layout_type == 'GRID':
|
||||
pass
|
||||
|
||||
# Called once to draw filtering/reordering options.
|
||||
|
||||
@@ -29,7 +29,7 @@ class MATERIAL_UL_matslots_example(bpy.types.UIList):
|
||||
else:
|
||||
layout.label(text="", translate=False, icon_value=icon)
|
||||
# 'GRID' layout type should be as compact as possible (typically a single icon!).
|
||||
elif self.layout_type in {'GRID'}:
|
||||
elif self.layout_type == 'GRID':
|
||||
layout.alignment = 'CENTER'
|
||||
layout.label(text="", icon_value=icon)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user