From c798e5a78ae515bbe336753f881838ca12bfedd0 Mon Sep 17 00:00:00 2001 From: "Jonas K." Date: Thu, 4 Jul 2024 15:23:42 +0200 Subject: [PATCH] geometry_gen:fabric_geometry: Fix indexing error for smaller fabrics Fix an indexing error in geometry generation that caused FABulous to crash when the fabric had fewer tiles on the Y axis than on the X axis. Signed-off-by: Jonas K. --- geometry_generator/fabric_geometry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geometry_generator/fabric_geometry.py b/geometry_generator/fabric_geometry.py index 8377553e..c2dbe3aa 100644 --- a/geometry_generator/fabric_geometry.py +++ b/geometry_generator/fabric_geometry.py @@ -101,7 +101,7 @@ def generateGeometry(self) -> None: maxWidth = 0 maxSmRelX = 0 maxSmWidth = 0 - for i in range(self.fabric.numberOfColumns): + for i in range(self.fabric.numberOfRows): maxWidth = max(maxWidth, tileGeometries[i][j].width) maxSmRelX = max(maxSmRelX, tileGeometries[i][j].smGeometry.relX) maxSmWidth = max(maxSmWidth, tileGeometries[i][j].smGeometry.width)