From bf9df2897c07a027781f23a48f0e59ea537078d0 Mon Sep 17 00:00:00 2001 From: Gorgious56 Date: Wed, 24 May 2023 16:54:57 +0200 Subject: [PATCH] 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 --- .../blenderbim/bim/module/model/workspace.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/model/workspace.py b/src/blenderbim/blenderbim/bim/module/model/workspace.py index a658af8316..7366d08e8b 100644 --- a/src/blenderbim/blenderbim/bim/module/model/workspace.py +++ b/src/blenderbim/blenderbim/bim/module/model/workspace.py @@ -323,15 +323,15 @@ class BimToolUI: def draw_basic_bim_tool_interface(cls): cls.draw_type_selection_interface() - if cls.props.ifc_class: - box = cls.layout.box() - if AuthoringData.data["type_thumbnail"]: - box.template_icon(icon_value=AuthoringData.data["type_thumbnail"], scale=5) - else: - op = box.operator("bim.load_type_thumbnails", text="Load Thumbnails", icon="FILE_REFRESH") - op.ifc_class = cls.props.ifc_class - if AuthoringData.data["ifc_classes"]: + if cls.props.ifc_class: + box = cls.layout.box() + if AuthoringData.data["type_thumbnail"]: + box.template_icon(icon_value=AuthoringData.data["type_thumbnail"], scale=5) + else: + op = box.operator("bim.load_type_thumbnails", text="Load Thumbnails", icon="FILE_REFRESH") + op.ifc_class = cls.props.ifc_class + row = cls.layout.row(align=True) row.label(text="", icon="EVENT_SHIFT") row.label(text="", icon="EVENT_A")