Skip to content

Commit

Permalink
Warn user if they didn't specify annotation reference
Browse files Browse the repository at this point in the history
  • Loading branch information
yaqwsx committed Jun 22, 2024
1 parent d4f2afe commit a8a1405
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kikit/panelize_ui_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ def readSourceArea(specification, board):
return expandRect(findBoardBoundingBox(board), tolerance)
if type == "annotation":
ref = specification["ref"]
if ref.strip() == "":
raise PresetError("When using source 'annotation' reference cannot be empty.")
return expandRect(extractSourceAreaByAnnotation(board, ref), tolerance)
if type == "rectangle":
tl = VECTOR2I(specification["tlx"], specification["tly"])
Expand Down

0 comments on commit a8a1405

Please sign in to comment.