diff --git a/kikit/panelize_ui_impl.py b/kikit/panelize_ui_impl.py index a340e0e2..490d72b4 100644 --- a/kikit/panelize_ui_impl.py +++ b/kikit/panelize_ui_impl.py @@ -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"])