mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Hide 'remove pset template/file' operator when there are no templates/files
This commit is contained in:
@@ -43,7 +43,8 @@ class BIM_PT_pset_template(Panel):
|
||||
else:
|
||||
row.label(text="No Pset Template Files", icon="FILE")
|
||||
row.operator("bim.add_pset_template_file", icon="ADD", text="")
|
||||
row.operator("bim.remove_pset_template_file", icon="X", text="")
|
||||
if PsetTemplatesData.data["pset_template_files"]:
|
||||
row.operator("bim.remove_pset_template_file", icon="X", text="")
|
||||
|
||||
row = self.layout.row(align=True)
|
||||
|
||||
@@ -58,7 +59,8 @@ class BIM_PT_pset_template(Panel):
|
||||
else:
|
||||
row.operator("bim.add_pset_template", text="", icon="ADD")
|
||||
row.operator("bim.enable_editing_pset_template", text="", icon="GREASEPENCIL")
|
||||
row.operator("bim.remove_pset_template", text="", icon="X")
|
||||
if PsetTemplatesData.data["pset_templates"]:
|
||||
row.operator("bim.remove_pset_template", text="", icon="X")
|
||||
|
||||
if PsetTemplatesData.data["pset_template"]:
|
||||
self.draw_pset_template()
|
||||
|
||||
Reference in New Issue
Block a user