mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
minor fixes
- error in settings poll message for bim.assign_selected_as_product - test that drawing.assign_product won't create new assignments for the same product
This commit is contained in:
@@ -2292,7 +2292,7 @@ class AssignSelectedObjectAsProduct(bpy.types.Operator):
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
if len(context.selected_objects) != 2:
|
||||
cls.poll_message_set({"ERROR"}, "2 objects need to be selected")
|
||||
cls.poll_message_set("2 objects need to be selected")
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
@@ -35,4 +35,5 @@ class TestAssignProduct(test.bootstrap.IFC4):
|
||||
label = self.file.createIfcAnnotation()
|
||||
ifcopenshell.api.run("drawing.assign_product", self.file, relating_product=wall, related_object=label)
|
||||
ifcopenshell.api.run("drawing.assign_product", self.file, relating_product=wall, related_object=label)
|
||||
assert len(wall.ReferencedBy) == 1
|
||||
assert wall.ReferencedBy[0].RelatedObjects == (label,)
|
||||
|
||||
Reference in New Issue
Block a user