Fix error if user hit shift-a in Annotation Tool without any drawing active

This commit is contained in:
Andrej730
2024-08-26 15:31:09 +05:00
parent 33bbf9fc53
commit edcfcd8850
@@ -184,6 +184,8 @@ def create_annotation():
create_annotation_occurrence(bpy.context)
else:
object_type = props.object_type
if not bpy.ops.bim.add_annotation.poll():
return
bpy.ops.bim.add_annotation(
object_type=object_type, data_type=tool.Drawing.ANNOTATION_TYPES_DATA[object_type][-1]
)