From 5f99672c08c92a9900ee06969bb33bcf1723ee00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Sun, 17 Jun 2018 09:45:00 +0200 Subject: [PATCH] MiRCARTCanonicalise.py: correctly reset last{Attribs,Colours} on each new row (fixes issue #1.) --- MiRCARTCanonicalise.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MiRCARTCanonicalise.py b/MiRCARTCanonicalise.py index 0e8a647..afda9b4 100755 --- a/MiRCARTCanonicalise.py +++ b/MiRCARTCanonicalise.py @@ -29,9 +29,9 @@ def canonicalise(inPathName): canvasStore = MiRCARTCanvasImportStore(inPathName) inMap = canvasStore.outMap.copy(); del canvasStore; with open(inPathName, "w+") as outFile: - lastAttribs = MiRCARTCanvasImportStore._CellState.CS_NONE - lastColours = None for inCurRow in range(len(inMap)): + lastAttribs = MiRCARTCanvasImportStore._CellState.CS_NONE + lastColours = None for inCurCol in range(len(inMap[inCurRow])): inCurCell = inMap[inCurRow][inCurCol] if lastAttribs != inCurCell[2]: