Small tester UI fix #3487

This commit is contained in:
Andrej730
2023-07-21 18:00:11 +05:00
parent 630ac7250a
commit c7a1acf974
2 changed files with 5 additions and 4 deletions
@@ -49,7 +49,8 @@ class FailedEntities(PropertyGroup):
class IfcTesterProperties(PropertyGroup): class IfcTesterProperties(PropertyGroup):
specs: StringProperty(default="", name="IDS File") specs: StringProperty(default="", name="IDS File")
ifc_file: StringProperty(default="", name="IFC File") ifc_file: StringProperty(default="", name="IFC File")
should_load_from_memory: BoolProperty(default=False, name="Load from Memory") should_load_from_memory: BoolProperty(default=False, name="Load from Memory",
description="Use the currently opened IFC project. Required for the detailed Tester UI")
active_specification_index: IntProperty(name="Active Specification Index") active_specification_index: IntProperty(name="Active Specification Index")
active_requirement_index: IntProperty(name="Active Requirement Index") active_requirement_index: IntProperty(name="Active Requirement Index")
@@ -35,9 +35,9 @@ class BIM_PT_tester(Panel):
self.props = context.scene.IfcTesterProperties self.props = context.scene.IfcTesterProperties
if tool.Ifc.get(): row = self.layout.row()
row = self.layout.row() row.prop(self.props, "should_load_from_memory")
row.prop(self.props, "should_load_from_memory") row.enabled = bool(tool.Ifc.get())
if not tool.Ifc.get() or not self.props.should_load_from_memory: if not tool.Ifc.get() or not self.props.should_load_from_memory:
row = self.layout.row(align=True) row = self.layout.row(align=True)