From a7e7a5fc941bbfb9cd2868b4d08c253b3f05783e Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Fri, 8 Apr 2022 00:21:30 +0300 Subject: [PATCH] Fix default icon checking. --- map_machine/pictogram/icon.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/map_machine/pictogram/icon.py b/map_machine/pictogram/icon.py index 4130953..7810d07 100644 --- a/map_machine/pictogram/icon.py +++ b/map_machine/pictogram/icon.py @@ -550,7 +550,10 @@ class Icon: def is_default(self) -> bool: """Check whether first shape is default.""" - return self.shape_specifications[0].is_default() + return ( + len(self.shape_specifications) == 1 + and self.shape_specifications[0].is_default() + ) def recolor(self, color: Color, white: Optional[Color] = None) -> None: """Paint all shapes in the color."""