mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 11:43:53 +00:00
Fix #2968. Deletions are no longer postponed. Should fix or reveal a lot of sync errors.
This commit is contained in:
@@ -61,6 +61,8 @@ class TestCreateCamera(NewFile):
|
||||
class TestCreateSvgSheet(NewFile):
|
||||
def test_run(self):
|
||||
ifc = ifcopenshell.file()
|
||||
ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcProject")
|
||||
tool.Ifc.set(ifc)
|
||||
document = ifc.createIfcDocumentInformation(
|
||||
Identification="X",
|
||||
Name="FOOBAR",
|
||||
@@ -87,12 +89,16 @@ class TestDeleteDrawingElements(NewFile):
|
||||
collection = bpy.data.collections.new("Collection")
|
||||
bpy.context.scene.collection.children.link(collection)
|
||||
collection.objects.link(obj)
|
||||
element = ifc.createIfcAnnotation()
|
||||
element = ifc.createIfcAnnotation(GlobalId=ifcopenshell.guid.new())
|
||||
tool.Ifc.link(element, obj)
|
||||
|
||||
element_id = element.id()
|
||||
subject.delete_drawing_elements([element])
|
||||
assert element_id in IfcStore.deleted_ids
|
||||
try:
|
||||
ifc.by_id(element_id)
|
||||
assert False
|
||||
except:
|
||||
pass
|
||||
assert not bpy.data.objects.get("Object")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user