mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 06:32:09 +00:00
Fix #3181.
This commit is contained in:
@@ -74,6 +74,21 @@ Scenario: Remove drawing - via object deletion
|
||||
When I press "bim.override_object_delete"
|
||||
Then the collection "IfcGroup/PLAN_VIEW" does not exist
|
||||
|
||||
Scenario: Remove drawing - deleting active drawing
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And the variable "wall1" is "IfcStore.get_file().by_type('IfcWall')[-1].id()"
|
||||
And I press "bim.add_drawing"
|
||||
And the variable "drawing" is "IfcStore.get_file().by_type('IfcAnnotation')[0].id()"
|
||||
And I set "scene.DocProperties.active_drawing_index" to "0"
|
||||
And I press "bim.activate_drawing(drawing={drawing})"
|
||||
And the object "IfcAnnotation/PLAN_VIEW" is selected
|
||||
When I press "bim.override_object_delete"
|
||||
Then the collection "IfcGroup/PLAN_VIEW" does not exist
|
||||
|
||||
Scenario: Reproducing freeze on generating drawing - Issue 3169
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
|
||||
@@ -345,6 +345,8 @@ class TestDuplicateDrawing:
|
||||
|
||||
class TestRemoveDrawing:
|
||||
def test_run(self, ifc, drawing):
|
||||
drawing.is_active_drawing("drawing").should_be_called().will_return(True)
|
||||
drawing.run_drawing_activate_model().should_be_called()
|
||||
drawing.get_drawing_collection("drawing").should_be_called().will_return("collection")
|
||||
drawing.get_drawing_group("drawing").should_be_called().will_return("group")
|
||||
drawing.get_group_elements("group").should_be_called().will_return("elements")
|
||||
|
||||
Reference in New Issue
Block a user