From 51c27ae75c9d90f37c31da138a06c9953ef7961e Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sat, 17 Aug 2024 07:24:49 +0200 Subject: skip empty gradient blocks (#3142) --- lib/extensions/gradient_blocks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/extensions/gradient_blocks.py') diff --git a/lib/extensions/gradient_blocks.py b/lib/extensions/gradient_blocks.py index d0eca4a4..68e1e8e9 100644 --- a/lib/extensions/gradient_blocks.py +++ b/lib/extensions/gradient_blocks.py @@ -107,7 +107,7 @@ class GradientBlocks(CommandsExtension): def _add_block_commands(self, block, previous_element): current = FillStitch(block) previous = FillStitch(previous_element) - if previous.shape.is_empty: + if previous.shape.is_empty or current.shape.is_empty: return nearest = nearest_points(current.shape, previous.shape) pos_current = self._get_command_postion(current, nearest[0]) -- cgit v1.2.3