Use icons to distinquish brush ents from others.

Mesh-data icons indicate brush entities, object-data icons indicate the
others.
This commit is contained in:
Bill Currie 2012-09-09 09:29:55 +09:00
parent 06fd951a55
commit fde8d29899

View file

@ -59,7 +59,13 @@ def ecm_draw(self, context):
layout = self.layout layout = self.layout
for item in self.menu_items: for item in self.menu_items:
if type(item[1]) is str: if type(item[1]) is str:
layout.operator("object.add_entity", text=item[0]).entclass=item[1] ec = context.scene.qfmap.entity_classes.entity_classes[item[1]]
if ec.size:
icon = 'OBJECT_DATA'
else:
icon = 'MESH_DATA'
op = layout.operator("object.add_entity", text=item[0], icon=icon)
op.entclass=item[1]
else: else:
layout.menu(item[1].bl_idname) layout.menu(item[1].bl_idname)