Remove the cryptic (and slightly annoying) console warning logs when trying to display the type manager when there is no element type in the file

This commit is contained in:
Gorgious56
2023-05-24 16:54:57 +02:00
parent 66161518df
commit bf9df2897c
@@ -323,6 +323,7 @@ class BimToolUI:
def draw_basic_bim_tool_interface(cls): def draw_basic_bim_tool_interface(cls):
cls.draw_type_selection_interface() cls.draw_type_selection_interface()
if AuthoringData.data["ifc_classes"]:
if cls.props.ifc_class: if cls.props.ifc_class:
box = cls.layout.box() box = cls.layout.box()
if AuthoringData.data["type_thumbnail"]: if AuthoringData.data["type_thumbnail"]:
@@ -331,7 +332,6 @@ class BimToolUI:
op = box.operator("bim.load_type_thumbnails", text="Load Thumbnails", icon="FILE_REFRESH") op = box.operator("bim.load_type_thumbnails", text="Load Thumbnails", icon="FILE_REFRESH")
op.ifc_class = cls.props.ifc_class op.ifc_class = cls.props.ifc_class
if AuthoringData.data["ifc_classes"]:
row = cls.layout.row(align=True) row = cls.layout.row(align=True)
row.label(text="", icon="EVENT_SHIFT") row.label(text="", icon="EVENT_SHIFT")
row.label(text="", icon="EVENT_A") row.label(text="", icon="EVENT_A")