Fix UI bug where changing classification levels sometimes didn't display

This commit is contained in:
Dion Moult
2022-09-02 15:21:21 +10:00
parent 0293c133ab
commit ffa3aae132
6 changed files with 242 additions and 5 deletions
+17 -1
View File
@@ -29,7 +29,12 @@ from mathutils import Vector
scenarios("feature")
variables = {"cwd": os.getcwd(), "ifc": "IfcStore.get_file()", "pset_ifc": "IfcStore.pset_template_file"}
variables = {
"cwd": os.getcwd(),
"ifc": "IfcStore.get_file()",
"pset_ifc": "IfcStore.pset_template_file",
"classification_ifc": "IfcStore.classification_file",
}
# Monkey-patch webbrowser opening since we want to test headlessly
webbrowser.open = lambda x: True
@@ -68,6 +73,17 @@ def an_empty_ifc_project():
bpy.ops.bim.create_project()
@given("an empty IFC2X3 project")
def an_empty_ifc_project():
IfcStore.purge()
bpy.ops.wm.read_homefile(app_template="")
if len(bpy.data.objects) > 0:
bpy.data.batch_remove(bpy.data.objects)
bpy.ops.outliner.orphans_purge(do_local_ids=True, do_linked_ids=True, do_recursive=True)
bpy.context.scene.BIMProjectProperties.export_schema = "IFC2X3"
bpy.ops.bim.create_project()
@when("I load a new pset template file")
def i_load_a_new_pset_template_file():
IfcStore.pset_template_path = os.path.join(