From a8a140573095cdafaa29530dd23f66a7e4c23ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mr=C3=A1zek?= Date: Sat, 22 Jun 2024 15:53:19 +0200 Subject: [PATCH] Warn user if they didn't specify annotation reference --- kikit/panelize_ui_impl.py | 2 ++ 1 file changed, 2 insertions(+) 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"])