diff --git a/doc/grid.png b/doc/grid.png index 37f84e5..a84b04f 100644 Binary files a/doc/grid.png and b/doc/grid.png differ diff --git a/doc/trees.png b/doc/trees.png index 126b3cc..f953a73 100644 Binary files a/doc/trees.png and b/doc/trees.png differ diff --git a/roentgen/grid.py b/roentgen/grid.py index c8168b1..c889c85 100644 --- a/roentgen/grid.py +++ b/roentgen/grid.py @@ -91,13 +91,13 @@ def draw_all_icons( ", ".join(sorted(extractor.shapes.keys() - specified_ids)) + "." ) - for icon in icons: # type: Icon + for icon in icons: icon.draw_to_file(join( output_directory, f"{' + '.join(icon.get_names())}.svg" )) draw_grid( - output_file_name, icons, columns, step, + output_file_name, sorted(icons), columns, step, background_color=background_color ) diff --git a/roentgen/icon.py b/roentgen/icon.py index 23f060e..3b5e96c 100644 --- a/roentgen/icon.py +++ b/roentgen/icon.py @@ -362,7 +362,15 @@ class Icon: self.shape_specifications += specifications def __eq__(self, other) -> bool: - return sorted(self.shape_specifications) == sorted(other.shape_specifications) + return sorted(self.shape_specifications) == sorted( + other.shape_specifications + ) + + def __lt__(self, other) -> bool: + return ( + sorted(self.shape_specifications)[0].shape.id_ + < sorted(other.shape_specifications)[0].shape.id_ + ) @dataclass