mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 08:45:22 +00:00
Fix error if user hit shift-a in Annotation Tool without any drawing active
This commit is contained in:
@@ -184,6 +184,8 @@ def create_annotation():
|
|||||||
create_annotation_occurrence(bpy.context)
|
create_annotation_occurrence(bpy.context)
|
||||||
else:
|
else:
|
||||||
object_type = props.object_type
|
object_type = props.object_type
|
||||||
|
if not bpy.ops.bim.add_annotation.poll():
|
||||||
|
return
|
||||||
bpy.ops.bim.add_annotation(
|
bpy.ops.bim.add_annotation(
|
||||||
object_type=object_type, data_type=tool.Drawing.ANNOTATION_TYPES_DATA[object_type][-1]
|
object_type=object_type, data_type=tool.Drawing.ANNOTATION_TYPES_DATA[object_type][-1]
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user