See #1917. Refactor and fix warning message when you haven't got any contexts in a project yet.

This commit is contained in:
Dion Moult
2021-12-10 13:31:23 +11:00
parent 62236c44ae
commit de4659570a
10 changed files with 87 additions and 35 deletions
@@ -41,7 +41,7 @@ Scenario: Add type instance - add a mesh where existing instances have changed c
And the object "IfcWall/Instance" data is a "Tessellation" representation of "Model/Body/MODEL_VIEW"
And the object "IfcWall/Instance" is selected
And the variable "context" is "{ifc}.by_type('IfcGeometricRepresentationSubContext')[-1].id()"
And I set "scene.BIMProperties.contexts" to "{context}"
And I set "scene.BIMRootProperties.contexts" to "{context}"
And I press "bim.add_representation"
And the object "IfcWall/Instance" data is a "Annotation2D" representation of "Plan/Annotation/PLAN_VIEW"
When I press "bim.add_type_instance"